Compare commits

...

2768 Commits

Author SHA1 Message Date
48f76dbb52 Remove unneeded stuff 2019-09-29 09:51:22 -07:00
ca3dacba47 Remove algorithm.hpp 2019-09-29 09:43:23 -07:00
6d47e093c5 Remove utility.hpp 2019-09-29 09:42:03 -07:00
d1626e96ef Remove unused overloads 2019-09-29 09:29:19 -07:00
160bcb723c Remove lazy_segment_range 2019-09-29 09:25:29 -07:00
c7ea093c27 Handle Supplemental Symbols and Pictographs 2019-09-28 11:47:22 -07:00
00434c93ef Implement correct width computation 2019-09-28 11:47:22 -07:00
b12033fd68 Handle grapheme clusters when computing width 2019-09-28 11:47:22 -07:00
e5ab813ffb Add a subset of the text library as an optional component 2019-09-28 11:47:22 -07:00
0fc7bd1573 Fix ambiguity for types with dodgy conversions 2019-09-28 11:35:20 -07:00
b4f1988c4b Provide overload for fmt::join that handles std::tuples
Address enhancement request #1322.

The overload is provided in `ranges` (original `fmt::join` exists
currently in `format.h` for historical reasons.

Tests for prvalue and lvalue tuple arguments as well as the empty
tuple are provided in `ranges-test.cc`.
2019-09-27 14:05:35 -07:00
4b8f8fac96 Update README.rst 2019-09-25 07:14:45 -07:00
3b2fc033d1 Making CUDA test work with CMAKE_MSVC_RUNTIME_LIBRARY
CMake 3.15 introduced a new way of handling MSVC CRT type definition for
the build: CMAKE_MSVC_RUNTIME_LIBRARY variable.
(https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html)

This is supposed to be the way to go with MSVC CRT selection in new
projects. Using this method however breaks the current CMake script for
CUDA test. The reason is the CUDA test uses "FindCUDA" CMake module to
detect and set up CUDA support in CMake, which is deprecated since CMake
version 3.10, and which does not support CMAKE_MSVC_RUNTIME_LIBRARY
selector correctly (i.e. it does not propagate the compiler option
related to the CRT).

I did not find a way to "patch" in the correct compiler options, so
(while knowing this feature is only available from CMake 3.15 on) I
decided to change also the way CUDA is handled and instead of using
FindCUDA, used enable_language. Apart from having some nice additional
side-effects, it also fixed the problem with CRT selection.

However, the propagation of the compiler options (and in particular the
options related to C++ standard selection) is still a bit flaky on
Windows+MSVC platform, so it had to be done manually.

The patch makes two things in parallel:

1) Introduces MSVC_BUILD_STATIC, which, together with CMake version >=
3.15, allows building static version of the 'fmt' lib (and all the
tests).

2) At the same time, for CMake >= 3.15 it switches handling of CUDA
support from (old) FindCUDA to (new) enable_language, to fix the
problems which the old method has with the new CRT selector for MSVC in
a new CMake.

Added a check for CUDA before enabling it.

Using VERSION_LESS instead of VERSION_GREATER_EQUAL

Since apparently VERSION_GREATER_EQUAL exists only from CMake 3.7, while
Android is using CMake 3.6.

Removed MSVC_RUNTIME_LIBRARY logic from the CMake file.

The static build can be set on the command line with CMake >= 3.15
by defining the policy and the CMAKE_MSVC_RUNTIME_LIBARY this way:

cmake -G <gen> <options>
    -DCMAKE_POLICY_DEFAULT_CMP0091=NEW
    -DMSVC_BUILD_STATIC=ON
    -DCMAKE_MSVC_RUNTIME_LIBRARY="MultiThreaded$<$<CONFIG:Debug>:Debug>"

When MSVC_BUILD_DEBUG is set the test 'posix-mock-test' is skipped as it
does not build with the static runtime.
2019-09-25 06:46:11 -07:00
ac59d9f3a4 workaround VS2019 Update 3 compiler bug. (#1328) 2019-09-24 11:29:29 -07:00
8f27ce4d8b add test for multiple compilation types 2019-09-24 06:25:21 -07:00
89b0c71fa9 fix name clash in header-only mode 2019-09-24 06:25:21 -07:00
f6a783ad2e fix get 2019-09-24 06:25:21 -07:00
ccc8f5db02 Disable integral operator<< (#1316) 2019-09-23 20:34:08 -07:00
20fdb88a1c Remove redundant and nonportable test (#1313) 2019-09-23 13:36:12 -07:00
f29901097f Don't use const char* overload of operator<< (#1309) 2019-09-23 12:35:08 -07:00
758446c80d Fix a warning (#1319) and simplify code 2019-09-19 16:00:40 -07:00
f7aedc5fc4 Fix shared build on Solaris 2019-09-19 14:12:03 -07:00
840a817ed2 add oss fuzz badge 2019-09-19 08:23:05 -07:00
79c923ba2c fmt.pc.in: Fix for cross compilation
These variables get set to /usr/lib and /usr/include , which is totally wrong in a cross compilation
environment.

Changed to standard pkgconfig values consistent with most other ones.
2019-09-16 17:18:21 -07:00
5dc577c064 Update ChangeLog.rst 2019-09-12 18:20:48 -07:00
c6d1a94a9f Fix fallback_format (#1306) 2019-09-09 17:28:53 -07:00
0656045d02 Fix format overload that takes text_style (#1305) 2019-09-08 18:41:02 -07:00
c85ae23c73 Add max_value 2019-09-08 09:21:30 -07:00
b3bf665764 Implement multiplication and part of assignment from pow of 10 2019-09-08 08:27:00 -07:00
0887887e23 Implement left shift 2019-09-07 18:10:36 -07:00
ac71d853be Refactor normalize and clean up 2019-09-07 17:28:59 -07:00
6649b8e0ca value -> bigit 2019-09-07 14:23:19 -07:00
56b5c192a0 Add a bigint stub and reenable grisu 2019-09-07 13:50:22 -07:00
b2f0b6e44e Tweak comment 2019-09-07 08:43:35 -07:00
3d9f3c163b Integrate new format string compilation 2019-09-07 07:01:51 -07:00
19547d5148 Update index.rst 2019-09-06 13:27:28 -07:00
972ffd3151 Update README.rst 2019-09-06 13:13:30 -07:00
2ed412fa38 Update README.rst 2019-09-06 13:03:14 -07:00
df4dcf2ece Fixed vs 2015 warning about unused variable when grisu is off 2019-09-06 11:29:56 -07:00
f7a4b4ab91 Make numeric alignment optional 2019-09-06 09:43:53 -07:00
611cf0b3c6 Format octal 0 as 0 2019-09-06 07:03:47 -07:00
58a8f2f539 Add ccache to the list of projects 2019-09-06 06:26:09 -07:00
1882b9687b Reduce the numer of ifdefs with an empty (u)int128_t fallback 2019-09-05 18:03:47 -07:00
6de0454b42 Add support for built-in __int128 when available 2019-09-04 07:05:08 -07:00
16e3c48bb0 Move definition of FMT_USE_INT128 to core.h 2019-09-04 07:05:08 -07:00
8ce5f680f2 Rename internal::is_integral and internal::is_arithmetic
To reserve space for the type traits sharing the same name as the ones
from standard library.
2019-09-04 07:05:08 -07:00
2fd8f9ec8a Initial implementation of optimal compile-time formatter generation 2019-09-02 19:50:30 -07:00
fe642d7648 Clarify use of the core API in header-only mode (#1296) 2019-09-02 17:14:30 -07:00
a128b5b2cb Simplify format string compilation 2019-09-02 06:48:19 -07:00
466128de00 Remove unused code and refactor 2019-09-01 13:08:53 -07:00
22e98a5b6a Make compile work with user-defined types 2019-09-01 11:49:27 -07:00
f18a3f36a7 Remove string_view_metadata
string_view_metadata was introduced to make compiled format relocatable.
However, format string compilation is an optimization and therefore
adding overhead and extra complexity for relocation is undesirable.
In most cases the string will be either static or outlive compilation
and formatting and if it doesn't, it's possible to make compiled
representation relocatale by other means.
2019-09-01 11:10:49 -07:00
7cad33563c Refactor format string compilation 2019-09-01 10:28:41 -07:00
e1ab6bc006 Simplify format string compilation 2019-09-01 08:31:32 -07:00
24a88545d9 Add -Werror to tests 2019-08-31 09:26:45 -07:00
422e7b9d70 Fix compile-time checks for user-defined types (#1292) 2019-08-31 08:35:38 -07:00
d1dd9d5327 Document floating-point n specifier (#1291) 2019-08-31 08:16:47 -07:00
9a56a608ee Fix warnings (#1288) 2019-08-31 08:16:47 -07:00
c76957565c FixedEnum -> StrongEnum and make it a regression test 2019-08-31 08:16:47 -07:00
200ee6f108 Fix minor clang-tidy warnings
using instead of typedef.

climits instead of limits.h

Added missing cast to size_t.
2019-08-31 07:02:21 -07:00
bcd9b9331a Map not int enum to correct underlying_type (#1286)
* Map not int enum to correct underlying_type

* Use non-zero constant in TestFixedEnum
2019-08-31 06:25:38 -07:00
345ba07f1d Add a CUDA test
test cuda: import fmt in CUDA source code

Current test is only for Windows(cl.exe).
Need to test more with the other host compilers...

* Activate the test when `find_package(CUDA)` worked
* The test runs with C++14

Detailed comments in 'test/cuda-test'

test cuda: add more comment / macro check

* checks both `__NVCC__` and `__CUDACC__`

More comments for CMake and CUDA source file.

test cuda: <fmt/core.h> checks NVCC and CUDA

The header file checks 2 things.

* __NVCC__: if the compiler is from NVIDIA
* __CUDACC__: if the source code is CUDA(.cu) file

Since we can't sure all users prefer latest, Version for
`find_pacakge(CUDA)` is downgraded to 9.0.
This is the minimum version for C++14 in CUDA
2019-08-30 17:45:50 -07:00
hhb
9e2490be4c Rename precision parameter
To avoid clang warning:

fmtlib/include/fmt/chrono.h:753:32: error: declaration shadows a field of 'formatter<duration<type-parameter-0-0, type-parameter-0-1>, type-parameter-0-2, void>' [-Werror,-Wshadow]
2019-08-28 07:29:04 -07:00
3f75e2b69e Make buffer_range public and update custom formatting docs (#1281) 2019-08-28 06:50:20 -07:00
744302add0 Workaround broken [[deprecated]] in Intel compiler (#1273) 2019-08-28 05:58:09 -07:00
f5556225a4 Eliminate shadow variable warning
gcc-9 gives the following shadow warning:
```
In file included from /Users/libraries/ioss/src/fmt/ostream.h:12,
                 from /Users/libraries/ioss/src/Ioss_DatabaseIO.C:59:
/Users/libraries/ioss/src/fmt/format.h: In function 'void fmt::v6::internal::parse_format_string(fmt::v6::basic_string_view<Char>, Handler&&)':
/Users/libraries/ioss/src/fmt/format.h:2442:10: warning: declaration of 'struct fmt::v6::internal::parse_format_string(fmt::v6::basic_string_view<Char>, Handler&&)::writer' shadows a global declaration [-Wshadow]
 2442 |   struct writer {
      |          ^~~~~~
/Users/libraries/ioss/src/fmt/format.h:1703:7: note: shadowed declaration is here
 1703 | using writer = basic_writer<buffer_range<char>>;
      |       ^~~~~~
```

Since the `writer` struct is only used internally in the `parse_format_string` function, its name can be changed somewhat aribtrarily to avoid conflicts with names in an outer scope.

Note that this warning is also present in the 6.0.0 release.
2019-08-27 14:29:39 -07:00
ad3c7855e2 Fix typos. 2019-08-27 06:26:17 -07:00
7512a55aa3 Update version 2019-08-26 06:23:37 -07:00
9bd2f1f9af Temporarily disable Grisu 2019-08-26 06:11:44 -07:00
b9815cf048 Simplify part_counter 2019-08-25 08:30:59 -07:00
fe00cddde2 Move part counter to the namespace scope
to reduce the number of instantiations
2019-08-25 08:22:43 -07:00
1a7d172dc7 which_value -> kind 2019-08-25 08:08:46 -07:00
006c2546f2 Get rid of basic_prepared_format 2019-08-25 07:57:56 -07:00
4ce006fb6e Simplify format string compilation 2019-08-25 07:48:09 -07:00
e2e557e273 Remove preparator 2019-08-25 06:47:15 -07:00
a5f470eb10 Test and fix compiled format_to_n and formatted_size 2019-08-25 06:38:41 -07:00
4070c1d80b PrepareTest -> CompileTest 2019-08-25 06:22:13 -07:00
f8b59251c4 Remove unused preparator 2019-08-24 12:48:24 -07:00
643aa4c8c4 Simplify format string compilation 2019-08-24 09:39:40 -07:00
ffe29a92f4 Get rid of internal::compile 2019-08-24 09:04:03 -07:00
e94d723667 Fix compiled format string version of format_to_n 2019-08-24 09:00:30 -07:00
a9337395a2 Remove unused variable 2019-08-24 08:46:15 -07:00
562a9f4991 Remove parts_container_concept_check 2019-08-24 08:41:43 -07:00
b257c56e51 Fix size types 2019-08-24 08:36:14 -07:00
1488df3395 Bump version 2019-08-24 07:31:25 -07:00
b918e3ff81 Fix docopt usage 2019-08-24 07:24:42 -07:00
23b04ca6d5 Update usage instructions 2019-08-24 07:16:45 -07:00
5d5918a74d Update usage instructions 2019-08-24 07:04:24 -07:00
413d97b33a Fix formatting in changelog 2019-08-24 06:46:43 -07:00
790fd90f40 Update changelog 2019-08-24 06:34:19 -07:00
c0890be77d Update changelog 2019-08-24 06:32:47 -07:00
5a4b24613b Update the default floating-point format docs (#1270) 2019-08-22 15:21:14 -07:00
45dc3486fe Update license 2019-08-22 08:37:36 -07:00
5a353fa8cf Draft license 2019-08-21 14:31:22 -07:00
c84d227da9 Update changelog 2019-08-21 13:06:21 -07:00
b2d4ca1546 Workaround an issue with std::filesystem::path being an infinitely deep range (#1268) 2019-08-21 11:22:59 -07:00
2aae6b120c Fix doc for importing header only target with CMake 2019-08-14 13:59:15 -07:00
9f09b8eed1 Fix a warning 2019-08-11 11:38:16 -07:00
2bb8120d98 Fix a warning 2019-08-11 09:27:59 -07:00
c1e97392be Fix warnings 2019-08-11 08:44:12 -07:00
4e99e09bb3 Fix warnings 2019-08-10 16:56:57 -07:00
1607a01870 Suppress a warning 2019-08-10 14:15:55 -07:00
e8219952c6 Restrict fmt::compile to literal strings
to make sure we don't break the API too much when making all of this
compile-time only.
2019-08-10 13:18:11 -07:00
544b537334 Update changelog 2019-08-10 10:01:23 -07:00
83c13a1fe3 Update changelog 2019-08-10 09:56:13 -07:00
2546dafece Update changelog 2019-08-10 09:25:16 -07:00
02c04b1736 Update changelog 2019-08-10 07:59:33 -07:00
5360ab0b59 Fix iteration over named arguments (#1168) 2019-08-09 11:53:07 -07:00
b615eca964 Update changelog 2019-08-05 05:37:44 -07:00
22a42c0b01 Cleanup compile implementation 2019-08-04 11:15:43 -07:00
c63624ed45 Update changelog 2019-08-04 10:38:33 -07:00
211d312406 Don't terminate on I/O errors in report_error 2019-08-04 09:38:47 -07:00
ef55e74e08 Update changelog 2019-08-04 09:20:49 -07:00
612669d343 Update changelog 2019-08-04 07:28:48 -07:00
ba63ac8c18 Make format_to a non-member 2019-08-04 06:47:49 -07:00
3fe49163bd Revert "Make format_to a non-member"
This reverts commit a5bd3ddb28.
2019-08-03 16:12:34 -07:00
a5bd3ddb28 Make format_to a non-member 2019-08-03 08:36:53 -07:00
3df0ea34e5 Remove unnecessary overloads 2019-08-03 08:26:51 -07:00
436acf3489 Make formatted_size & format_to_n non-members 2019-08-03 07:54:49 -07:00
823128049b Make format a non-member 2019-08-03 06:31:24 -07:00
1dfa2591b3 Make operator _a constexpr 2019-08-01 16:56:49 -07:00
6f2dd30e38 Simplify udl_formatter return type 2019-08-01 16:56:49 -07:00
431d0f85cf Use basic_string_view in non-template UDL 2019-08-01 16:56:49 -07:00
ad71f5a706 Use forwarding references in UDL template 2019-08-01 16:56:49 -07:00
d0f2f3b816 Update usage.rst 2019-07-27 20:25:40 +03:00
eac2796ce3 Fix locale detection 2019-07-26 12:13:05 +03:00
ee36257469 Internalize format_part 2019-07-26 09:02:45 +03:00
bbf0bada33 Simplify compile 2019-07-26 07:58:19 +03:00
3730b4f039 Cleanup compile implementation 2019-07-25 21:26:22 +03:00
25ff2efc0a Update changelog 2019-07-25 19:59:59 +03:00
9393fe26f6 prepare -> compile 2019-07-25 19:39:41 +03:00
b48ffc14a4 Update changelog 2019-07-25 18:44:40 +03:00
3268531bc9 Workaround a broken C locale on Windows 2019-07-25 12:55:23 +03:00
8bd59ec936 Use fputws for outputting wide strings
Also adds fwide byte/wide orientation checking to verify streams are
able to receive the character type in question.

On Windows, the fwide calls are no-ops that pass through the second
arg and optimize out the if statement entirely.
2019-07-25 10:29:32 +03:00
1235f0a24a Fix typo in usage.rst 2019-07-24 15:54:02 +02:00
4fb73d1145 Update README.rst 2019-07-21 15:28:48 +02:00
f9ceefb0fe Fix a warning and is_negative usage 2019-07-19 14:18:10 +02:00
6bcc3fd216 Fix warnings 2019-07-19 13:27:41 +02:00
6a497e1d06 Fix warnings 2019-07-19 06:18:46 +02:00
e9b9b0aefa clang-format 2019-07-18 06:28:53 +02:00
ec24342b2b Fix more warnings 2019-07-18 06:28:17 +02:00
230b24944c Fix sign conversion warnings 2019-07-17 21:18:55 +02:00
cadd92d69f Fix #1232. 2019-07-17 11:52:10 +02:00
41076d1de3 Use FMT_THROW in fmt/color.h.
This allows fmt to be compiled with `-fno-exceptions`.
2019-07-17 10:15:31 +02:00
d561cb47a7 Opt-in macro to enforce use of compile-time format strings 2019-07-16 07:08:59 +02:00
699fe8e711 Remove const qualification in compile-time checks 2019-07-15 09:20:16 +02:00
da2d33f1f1 Update changelog 2019-07-12 16:21:13 -07:00
af4734fd15 Fix warnings 2019-07-12 16:03:12 -07:00
a3a74672a0 Update signatures 2019-07-09 17:05:34 -07:00
c11e68305f Update signatures 2019-07-09 17:01:13 -07:00
dd8cc8b0ba Disallow passing views as lvalues 2019-07-09 12:18:48 -07:00
f6f0415b83 typedef -> using 2019-07-07 17:14:26 -07:00
c92dc37464 typedef -> using 2019-07-07 15:40:34 -07:00
e3f20d3e13 Remove gcc 4.4 workaround and use proper alias templates (#940) 2019-07-07 14:35:56 -07:00
b438812324 Clean up is_output_iterator 2019-07-07 12:59:55 -07:00
bc15e3700e typedef -> using 2019-07-07 10:44:06 -07:00
cf5ebf2059 Cleanup 2019-07-07 10:09:22 -07:00
9c20e72de3 Cleanup 2019-07-07 07:58:30 -07:00
79209598f5 core_format_specs -> sprintf_specs 2019-07-07 06:54:25 -07:00
5488d0b53a spec -> specs 2019-07-07 06:39:20 -07:00
e4f84ee1c6 Refactor format_specs for #1109 and #940
Refactor `format_specs` and related APIs to support variable-width fill
(#1109), improve naming consistency, remove legacy setters (#940), and
optimize layout.
2019-07-06 20:57:40 -07:00
8e0dcd20b3 Remove old deprecated functions 2019-07-06 07:55:52 -07:00
1d3e3d8c04 Make the 'n' format specifier work with grisu disabled 2019-07-04 15:15:14 -07:00
bc628f8d49 Fix EXPECT_DEBUG_DEATH_IF_SUPPORTED (#1214) 2019-07-04 07:55:36 -07:00
edd13fcc1c Fix small number rounding with fixed precision in grisu 2019-07-04 07:11:40 -07:00
6a031347e5 Remove unnecessary qualification 2019-07-03 21:14:45 -07:00
bc14c6ee20 Use the decimal point from locale 2019-07-03 17:55:00 -07:00
476f25cd81 Remove ancient gcc workaround 2019-07-03 16:37:02 -07:00
c9d5a08ed8 Add the 'n' float format specifier 2019-07-03 16:36:23 -07:00
f487ddbdfa thousands_sep -> add_thousands_sep 2019-07-03 16:18:12 -07:00
d8fd1699b1 Make data names follow naming conventions 2019-07-03 16:14:14 -07:00
c286ffc88d int_traits -> uint32_or_64_t 2019-07-03 16:01:21 -07:00
1289782f06 Get rid of add_thousands_sep 2019-07-03 15:50:05 -07:00
2249f5571e Simplify thousands separator handling and cleanup 2019-07-03 15:30:45 -07:00
e76446958c Cleanup and remove deprecated visit 2019-07-03 14:31:01 -07:00
de37de912b Remove deprecated color API 2019-07-03 14:19:24 -07:00
df1a3a141b Remove null_terminating_iterator 2019-07-03 14:00:55 -07:00
78dec87a46 typedef -> using 2019-07-03 11:05:20 -07:00
ded0a3bb3d Internalize undocumented basic_writer 2019-07-03 10:01:03 -07:00
83174f2a1f Refactor ranges 2019-07-03 07:23:08 -07:00
c2e84ee9cc Fix FormatTest.StrError on Solaris 2019-07-03 06:09:24 -07:00
2711cb1672 Apply clang format and other minor formatting tweaks 2019-06-30 08:52:15 -07:00
ab0ba8a9d0 Don't emit decimal point if there are no trailing digits (#1210) 2019-06-30 08:44:59 -07:00
bd3fd3bfda clang-format 2019-06-30 06:58:49 -07:00
260c115908 Fix formatting of 0.0 with (#1210) 2019-06-30 06:54:41 -07:00
9d97201ede add oss-fuzz support
see https://github.com/google/oss-fuzz/pull/2381

the history of the fuzz branch is long and messy and
is difficult to rebase on top of the current master.

Squashed commit of the following:

commit b9d6db50010e185d0af2590a35472e9334102248
Author: Paul Dreik <github@pauldreik.se>
Date:   Sat Jun 29 21:50:34 2019 +0200

    update exception with a more accurate description

commit f3fbaf60cc80c7f57fa95962dc0069b10c3d3e61
Author: Paul Dreik <github@pauldreik.se>
Date:   Sat Jun 29 21:34:55 2019 +0200

    fix missing flags in reproduce build

commit 40a17bec7a1ad724203577842a254ca9c42da388
Author: Paul Dreik <github@pauldreik.se>
Date:   Sat Jun 29 21:22:48 2019 +0200

    move check for large precision values closer to where needed

commit ef6e23e1f52d639c5aec1a1e713157cec380a8c3
Author: Paul Dreik <github@pauldreik.se>
Date:   Fri Jun 28 20:55:34 2019 +0200

    simplify the fuzzer build script

commit eadee6e0557be6df695e80f0f2717046a29846e0
Author: Paul Dreik <github@pauldreik.se>
Date:   Fri Jun 28 20:47:54 2019 +0200

    minimize source code pollution

commit 1ece6416438f199c164ee9aa89f42ad1f21a4985
Merge: f404079b 037b84f2
Author: Paul Dreik <github@pauldreik.se>
Date:   Fri Jun 28 20:22:52 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

    # Conflicts:
    #	CMakeLists.txt

commit f404079b4e00e51b0d5a4c9218cbe7afb350b777
Author: Paul Dreik <github@pauldreik.se>
Date:   Fri Jun 28 20:20:52 2019 +0200

    make named_arg write into a string or a memory_buffer

    this makes the fuzzer consistent with the others.

commit 545dbe136817eef9e734c32991a324874a51bb4a
Author: Paul Dreik <github@pauldreik.se>
Date:   Thu Jun 20 06:34:17 2019 +0200

    tidy up extra newlines, missing std:: etc.

commit 2d816ef2b13fc2a46c0df76a91f7912bd7196087
Author: Paul Dreik <github@pauldreik.se>
Date:   Mon Jun 17 20:49:08 2019 +0200

    update unit test to handle expected result following review comment

commit a5b9a26808d0165acd2edc4c3baabf9bff40d8bd
Author: Paul Dreik <github@pauldreik.se>
Date:   Mon Jun 17 20:40:06 2019 +0200

    update build script to reflect changes after review

commit 8411cb78984f76c74bca273c0bb18918e084e711
Author: Paul Dreik <github@pauldreik.se>
Date:   Mon Jun 17 20:39:39 2019 +0200

    review comment: clarify what the .gitignore is for

commit 18d9e7bb43d98568fe491e076106e4fa29070b33
Author: Paul Dreik <github@pauldreik.se>
Date:   Mon Jun 17 20:36:56 2019 +0200

    review comment: don't touch root .gitignore

commit 7683d7faa116a6e261da824ec6c1a6a75689841b
Author: Paul Dreik <github@pauldreik.se>
Date:   Mon Jun 17 20:35:40 2019 +0200

    review comment: condiionally include main.cpp

commit be0bdaeb27b0c1914cc0b0fd85c2b3bcc6fd2245
Author: Paul Dreik <github@pauldreik.se>
Date:   Mon Jun 17 20:31:28 2019 +0200

    review comment: drop commented out code not working on travis

commit 013429812d7fb745eec146296623ea245c4848b4
Author: Paul Dreik <github@pauldreik.se>
Date:   Mon Jun 17 20:30:26 2019 +0200

    review comment: renumber case labels

    the old ones were to be able to reuse the corpus, let's drop it

commit f66fe7bead4a71978f21d9e47a8f3f9e4935fccd
Author: Paul Dreik <github@pauldreik.se>
Date:   Mon Jun 17 20:06:47 2019 +0200

    review comment: libfmt->fmt

commit 4a4ddb654dd5b90646cd7e6ff45318c17b66dc9f
Author: Paul Dreik <github@pauldreik.se>
Date:   Mon Jun 17 20:05:32 2019 +0200

    reuse fmt_safe_duration_cast

commit 0a1679411a8bd77c2ff34e1cd572307c92e12040
Author: Paul Dreik <github@pauldreik.se>
Date:   Mon Jun 17 20:02:48 2019 +0200

    review comment: name convention, better name

    C was for "chrono duration"

commit 63084cac00b798c636e0dc13207df46a5c4539f6
Author: Paul Dreik <github@pauldreik.se>
Date:   Mon Jun 17 20:00:50 2019 +0200

    reuse earlier extract fmt_safe_... function

commit b23388d4d7f919163ead9a9e9bdd50d14daf80b7
Author: Paul Dreik <github@pauldreik.se>
Date:   Mon Jun 17 19:58:55 2019 +0200

    review comment: don't output inf.inf

commit 6f861f1d89d2127bbe2446d176d59a354665cc15
Author: Paul Dreik <github@pauldreik.se>
Date:   Mon Jun 17 19:57:00 2019 +0200

    review comment: extract function for invoking safe_duration_cast

commit df19bc87ccff77d4bedf54fa3d3992f78ef699bd
Author: Paul Dreik <github@pauldreik.se>
Date:   Mon Jun 17 19:47:30 2019 +0200

    review comment: leftover garbage

commit 84eea802efb1164c4f2a83b2e480a7c5bdf4e921
Author: Paul Dreik <github@pauldreik.se>
Date:   Mon Jun 17 19:45:22 2019 +0200

    review comment: turn cmake option into macro for SAFE_DURATION_CAST

    decided to have it on by default

commit c3a159498c2544a52662cd03d23d5a1d00537bba
Author: Paul Dreik <github@pauldreik.se>
Date:   Mon Jun 17 19:40:14 2019 +0200

    review comment: extra newline

commit aa556875c5161d817c347ff984dad171c7a35df9
Author: Paul Dreik <github@pauldreik.se>
Date:   Mon Jun 17 19:38:49 2019 +0200

    review comment: file name convention

commit 4102d82c455324bda4ccd64072eab86b3f0ecebf
Merge: 28add37d 4912cff6
Author: Paul Dreik <github@pauldreik.se>
Date:   Mon Jun 17 16:29:29 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

commit 28add37df3944cbaa00f614e8063210a6d83c17c
Author: Paul Dreik <github@pauldreik.se>
Date:   Fri Jun 14 21:44:06 2019 +0200

    disable check to pass travis

commit 4119378aedfd3e4063058e8f1f03c29d9f44d5e8
Author: Paul Dreik <github@pauldreik.se>
Date:   Fri Jun 14 21:32:39 2019 +0200

    add missing include

commit ba2efb82f20d6ecb5e49a8c6ced96a7febedc175
Author: Paul Dreik <github@pauldreik.se>
Date:   Fri Jun 14 21:04:41 2019 +0200

    try working around build issue on travis

commit 380671a2cb6e52f2b7d5eaad409d491baba5b7e6
Author: Paul Dreik <github@pauldreik.se>
Date:   Fri Jun 14 20:22:41 2019 +0200

    write positive infinity without sign

commit fd72b9adace17e00c46aae24e061bf14c3af6bb1
Author: Paul Dreik <github@pauldreik.se>
Date:   Fri Jun 14 20:20:50 2019 +0200

    remove leftover from merge

commit 1ae3128be2c53914e4c840d12e1b02c59758c378
Author: Paul Dreik <github@pauldreik.se>
Date:   Fri Jun 14 20:14:45 2019 +0200

    format to buffer instead of string

commit 1d83a561244c2fe81231d17e911c6eb24c87cac4
Author: Paul Dreik <github@pauldreik.se>
Date:   Fri Jun 14 19:50:19 2019 +0200

    fix warnings

commit a33b45a7bb5cf70eb3ef1cd95908282621195f1f
Author: Paul Dreik <github@pauldreik.se>
Date:   Fri Jun 14 19:43:46 2019 +0200

    refactor and fix warnings

commit 02afb12dd5b05804a1a8b55e1b9fb7e3de593e84
Author: Paul Dreik <github@pauldreik.se>
Date:   Fri Jun 14 19:17:27 2019 +0200

    use fixed size input

commit 35f84c8cf20efb18a137efecd10dcdc6bcebf7b5
Author: Paul Dreik <github@pauldreik.se>
Date:   Fri Jun 14 19:07:43 2019 +0200

    factor out main into a separate file

commit a23b7a198ba739dd813897901855c98441e6f29b
Author: Paul Dreik <github@pauldreik.se>
Date:   Fri Jun 14 18:56:40 2019 +0200

    refactor

commit 9a3f4cfb3bc32a304a1a49b8ff24fbc2f924266c
Merge: 7842582a 12f46838
Author: Paul Dreik <github@pauldreik.se>
Date:   Fri Jun 14 18:20:03 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

    # Conflicts:
    #	include/fmt/chrono.h

commit 7842582a0089c24a5d44bbb2d156beb732bb7b58
Merge: 90cab5aa cbbee1b3
Author: Paul Dreik <github@pauldreik.se>
Date:   Thu Jun 13 10:41:34 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

commit 90cab5aa023271a3a746cf9c60dd613b4546ca10
Merge: 8feb8a3f e5422db4
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed Jun 12 18:49:08 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

commit 8feb8a3fe20da043a8303e59b1580b4b2862cc57
Merge: e9fabac1 87fbc6f7
Author: Paul Dreik <github@pauldreik.se>
Date:   Tue Jun 11 19:18:35 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

commit e9fabac1dd6d710fec1b30ca51dc953f57f2f9f5
Merge: eaff9316 e1a67b52
Author: Paul Dreik <github@pauldreik.se>
Date:   Mon Jun 10 22:38:36 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

commit eaff93166402ff9a16a9ab0fab1081104f4f06b8
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 22:29:01 2019 +0200

    drop old crashes

commit 7f861e481abb7367bd187c92fe202e25d36d0dd0
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 21:47:30 2019 +0200

    build fuzzers as part of the linux clang 6 build

commit 42c339066dce148723f452d4a94487a6ac80637f
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 21:42:12 2019 +0200

    travis has old libs

commit 9264e3ac82582a941eba3501301dee1468175c08
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 21:33:26 2019 +0200

    more travis workarounds

commit c6eed3adaf6cf65d440dd58c88a034f61c55114f
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 21:27:49 2019 +0200

    travis workaround

commit 5e230d6240841dbc67f0c08ace3a1c24defea54f
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 21:15:36 2019 +0200

    fix constexpr issues

commit cc5fc033479c769a8ac19115aef48020c532c943
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 21:11:13 2019 +0200

    add a fuzzer build

commit 3997375296eca0d0455e0935ef3aed8b010ecf2d
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 20:53:04 2019 +0200

    fix minor documentation errors

commit 1572411261abd5c0756ff2998ab707f1131d4fdf
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 20:49:25 2019 +0200

    polish the documentation

commit 9e5274437cfc3e9c82131c14cf7f3a0abdb10025
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 20:32:45 2019 +0200

    remove unused headers

commit 4b2492a5e037d3153de342ef7f2729b69e8f5dce
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 20:28:12 2019 +0200

    clang format

commit a0004ebb417bce5a24c15ea65a0f3741e45b8480
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 20:27:02 2019 +0200

    format also void*

commit 820142ee2076ae17fea25857c41a1ecdca4a8521
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 20:12:21 2019 +0200

    improve two_args with lessons learnt from the others

commit 7b8fd7f5123fccf78b600c69ca25d025582c095e
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 20:11:18 2019 +0200

    improve function names

commit 641bf36a7a061abf6a02d5e31f3adeb33b079f43
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 20:07:29 2019 +0200

    clang format

commit 7975c0c3cbe19a7159336ad8fcb170fa6259b1cb
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 20:06:02 2019 +0200

    apply lessons learned from chrono fuzzer on sprintf

commit 972124c9f921f8ef786f99c294f556bb7dd9b9ee
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 19:55:49 2019 +0200

    format to buffer instead of string

commit 7b015c692364d1e087a59dfe83dda1b8f8fd2991
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 19:50:25 2019 +0200

    apply lessons learned from the chrono fuzzer at one_arg

commit daa8ea95dd71704e367b760fa6605f5a7cac6890
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 19:41:17 2019 +0200

    renumber cases

commit a667365d0e0f3eb0bc6d6f2cfee5e128a6574aee
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 19:38:06 2019 +0200

    clang format

commit e0e361b8a3594c43e131d661a28381613a186c2b
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 19:36:35 2019 +0200

    disable fuzzing by default

commit ccb4274ab246ee1fe3becb2b73432179a8a5fe6f
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 19:36:25 2019 +0200

    refresh named_arg with lessons learnt from the chrono fuzzer

commit 60da706d4ef35c18eb967bf4ba8d395ef05a9c61
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 19:36:00 2019 +0200

    fix build error

commit e361bfc24246d7c7e91f5e45209eda2f22689d98
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 19:00:11 2019 +0200

    add comment about formatting to string vs. memory buffer

commit 74c0ed062d34eae1786ca699886ad4f3bccc7fd1
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 18:51:23 2019 +0200

    try to use better names

commit 4efea36f77020eecf3c7826f891417f94aedf6f4
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 18:46:07 2019 +0200

    fix clang build error

commit 03cdd2e4631ad302dde3e1048671d3bb08956096
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 18:44:21 2019 +0200

    drop workarounds fixed upstream

commit e936829ebbd97ed2e6f8c5f595b414c0982f2e4d
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 18:41:02 2019 +0200

    move the fuzzers into the test/ subdirectory

commit 2967765698259764c1f06966a7cdefbc5365e5f2
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 18:30:03 2019 +0200

    revert temporary tests handled upstream

commit 749c5027b0eab3d90d8fbfb6e55ee313a7f7dfe4
Merge: dee69088 5d9100fa
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 17:49:00 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

commit dee690881bd33bb77bee1d5ffce643e8bef84a33
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 17:40:37 2019 +0200

    keep documentation comment formatted properly

commit 87d2c99487eef586ce54d432697f384cbe7a50e1
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 17:36:12 2019 +0200

    switch to fmt constexpr macros

commit c23fa59139c425a3dfa2e5eeaeb3269c251c90d1
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 17:30:22 2019 +0200

    clang format

commit 9e58207e9b24a8cc90c721277405b409dd61740d
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 17:27:03 2019 +0200

    get rid of safe_duration_cast submodule

    replaced with an embedded miniature version

commit a4d36eac46e5db45ded96f80f84986f4f76ea0ec
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Jun 9 17:25:00 2019 +0200

    add safe_duration_cast into fmt

commit 7d5b0ecef37722c40952251c88d74a2552221d84
Author: Paul Dreik <github@pauldreik.se>
Date:   Sat Jun 8 22:39:33 2019 +0200

    mark #1194 as fixed

commit ee91514ecf7a8788f2081996db85eef50d7cd57b
Merge: 60569117 4faadff0
Author: Paul Dreik <github@pauldreik.se>
Date:   Sat Jun 8 22:25:37 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

commit 6056911784bc86e6caf56a61fd64142f113d531e
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed Jun 5 09:58:30 2019 +0200

    format to small size buffer instead of string

commit 9f006097255c239188840b589f6e39cbb4476481
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed Jun 5 09:45:23 2019 +0200

    switch to fmt::string_view and workaround reported bug

commit 387de0d9440852fac974ff165b2555d54e2380da
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed Jun 5 06:26:15 2019 +0200

    ignore build directories

commit 55da271c5bb3c11a239c4e46570b6741803ce329
Merge: 3716491e c264e641
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed Jun 5 06:12:36 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

commit 3716491ec51c34a918834857c67300eea180ba02
Author: Paul Dreik <github@pauldreik.se>
Date:   Mon Jun 3 07:03:29 2019 +0200

    fix UB in on_second

commit 2740241b13b7417a4dae655f825ea5a551ffe7ba
Merge: 1c258402 d54e64b3
Author: Paul Dreik <github@pauldreik.se>
Date:   Mon Jun 3 06:37:18 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

    # Conflicts:
    #	include/fmt/chrono.h

commit 1c258402a4bd03f390e0256fa9475cc5187d37f9
Merge: ca9596d1 f57227a1
Author: Paul Dreik <github@pauldreik.se>
Date:   Sat Jun 1 08:01:58 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

commit ca9596d1c91b0315b407ce2c4b3e9e5ba1aeb640
Merge: 1c274cfd d07cc202
Author: Paul Dreik <github@pauldreik.se>
Date:   Thu May 30 19:42:33 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

commit 1c274cfd4112138bfc59dd16f58022016128fe85
Author: Paul Dreik <github@pauldreik.se>
Date:   Thu May 30 08:12:10 2019 +0200

    make it easier for the chrono fuzzer to explore

    using a fixed size makes the cases cross pollinate
    each other better.

    the execution speed is much higher as well

commit f0d7cccdc70c98576b7129428c416e7c9e68a8aa
Author: Paul Dreik <github@pauldreik.se>
Date:   Thu May 30 07:36:21 2019 +0200

    add a build adapted for analysis of fuzzing performance

commit 56f7cf3fa979de415174a10b18221727e3138b7b
Author: Paul Dreik <github@pauldreik.se>
Date:   Thu May 30 06:25:10 2019 +0200

    allow negative values again

commit a77a5fc505bbeab1cfa36be16d40f7799689317a
Author: Paul Dreik <github@pauldreik.se>
Date:   Thu May 30 05:45:55 2019 +0200

    fix UB on signed int overflow in chrono_formatter constructor

    see https://github.com/fmtlib/fmt/issues/1179

commit b6a592720be520b58ed2f2d8668ffc6c8b71f0f7
Merge: 492a2046 30bce6c1
Author: Paul Dreik <github@pauldreik.se>
Date:   Thu May 30 05:26:30 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

    # Conflicts:
    #	include/fmt/chrono.h

commit 492a204623c3c4bbf04c9d47d69979d3a484959c
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed May 29 21:36:00 2019 +0200

    fix bad assert

commit 0ae68b03fbb0e80e292a01f529d5cd7e76349907
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed May 29 21:35:49 2019 +0200

    add unsigned types for chrono fuzzing

commit 2753d7db76645e8847ff2110c5e98f5c8de4a6b9
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed May 29 20:25:21 2019 +0200

    use C++17

commit bc12742f098ec8b513985daedc57faa518203eb0
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed May 29 19:44:59 2019 +0200

    add symlink for safe_duration_cast

commit 67201d2639b93736768e109d73b3e9ccc9401c48
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed May 29 19:40:40 2019 +0200

    turn on safe duration cast for the fuzzer builds

commit 31a70080a63a5213594e4b4e6a33e7e315cf756e
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed May 29 19:32:52 2019 +0200

    clang format

commit 981e30c5782d04453ece1b31e887da4f29268370
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed May 29 19:30:19 2019 +0200

    reduce maximum allocation size

commit 7ba51da81de7ecbc5498a22dc29de5b0648bcad2
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed May 29 19:30:01 2019 +0200

    make nan unit test pass

commit 95b4b9c28a589c30727826dd4e1367bebfad5894
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed May 29 18:39:08 2019 +0200

    special case nan and inf

commit 2673c965506e51d150c005340698a6e15d98aaba
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed May 29 16:40:11 2019 +0200

    build a fast fuzzer, for making coverage fast

commit db52b62612fd7ea3ceeaee05584fd8cb83e54a35
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed May 29 16:39:48 2019 +0200

    add safe duration cast as submodule

commit c8a028faec5d91728472f5de01ea8b1766fb929d
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed May 29 16:00:26 2019 +0200

    enable chrono fuzzing for non-negative values

commit de3555cc573e561691858ca16586f8b45a3ae703
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed May 29 13:06:35 2019 +0200

    try start using safe duration cast

commit 5c3245118c3debcb3f6f69c04c2c32d48449ee16
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed May 29 09:59:34 2019 +0200

    add failing test

commit 3a565d3b091c29210e24042f86869fecafb70914
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed May 29 09:59:09 2019 +0200

    fix cmake option type (should be string, not bool)

commit 61c67564207a13992b1c69d95614b2c4aec5df86
Merge: 63e7b9e3 bb254d14
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed May 29 07:03:42 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

commit 63e7b9e32c714c594d019ef463c9c40a3510a2f2
Merge: 7dd1d80f 5e7bdf1b
Author: Paul Dreik <github@pauldreik.se>
Date:   Fri May 17 19:17:20 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

commit 7dd1d80f3a32465d0fa13ce733bff8686a5b0bad
Merge: 2c9aa5a3 2a9e8b52
Author: Paul Dreik <github@pauldreik.se>
Date:   Tue May 14 19:38:32 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

commit 2c9aa5a31e64af25f8bb4afa8134258822532d3e
Merge: 16a442c8 2c77562b
Author: Paul Dreik <github@pauldreik.se>
Date:   Tue May 14 06:33:16 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

commit 16a442c864dbdce70c22b4a859dba5e3b5edaf35
Merge: b1d70b61 f4dfd6e3
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun May 12 15:24:31 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

    # Conflicts:
    #	include/fmt/chrono.h

commit b1d70b6144c7a61e580eb44ec7d1bdd2368f5531
Author: Paul Dreik <github@pauldreik.se>
Date:   Fri May 10 08:52:57 2019 +0200

    prevent excessive time (found by oss-fuzz)

    the following triggered this:
    std::string message =
          fmt::format("\377{:.214718908}\377", fmt::arg("/\0", 0.f));

    there are probably more places with calls to fill_n which could be checked

commit 9a91093a6b20fd22afd6739f5dcba3b00f6f8eaf
Merge: 7de0fdec e9bab6d0
Author: Paul Dreik <github@pauldreik.se>
Date:   Thu May 9 06:06:32 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

    # Conflicts:
    #	include/fmt/chrono.h

commit 7de0fdec38270f2d0302413904a5ef1b13d47177
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun May 5 20:08:53 2019 +0200

    clang format

commit bb375e1ca10eb3cc2c6684bf698ad4738ab7eb10
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun May 5 19:47:10 2019 +0200

    seems to pass the unit test now (except for the nan stuff from victor)

commit 786b4b7351bc8e305ad7e68d11ca6b542f66d456
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun May 5 19:25:23 2019 +0200

    add assert triggering data, and unit test

commit 2790e480b81ec83d00315aa69407fe71b8c4c637
Merge: fa859a05 ca978b3d
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun May 5 18:42:51 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

commit fa859a05c2c3abef263166f3a44cdbaa3122d642
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun May 5 18:18:54 2019 +0200

    add crash

commit 1f6e341b1c4bc966a44c7a98b63f22bd65958d0b
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun May 5 18:18:27 2019 +0200

    assert floating point is finite internally

commit 50877748d08a0f4433af4f1213c5bc9021e76e7a
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun May 5 17:32:03 2019 +0200

    invoke undefined behaviour inside chrono

commit bac7ac4149f2d001f7b36236e1710484674d029b
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun May 5 17:31:35 2019 +0200

    refactor the fuzzer build script

commit b19c4cd84a0c8b6d4a7beb281ad881156173ce78
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun May 5 16:25:11 2019 +0200

    add one more crash

commit 7607592e06ebaa189dc180441fa1863430e0938e
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun May 5 16:24:05 2019 +0200

    add crashing input

commit b059a98b27b40cd284e08a54493c25363d743557
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun May 5 16:21:25 2019 +0200

    trigger undefined behaviour with NaN durations

commit 7cce33250282b397c00159e6809125f5fc1c0190
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun May 5 16:20:51 2019 +0200

    add asan only fuzzer

commit 757319a4e30978d8661b3be8f75937266071b413
Merge: a574b21c c1d430e6
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun May 5 06:34:59 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

    # Conflicts:
    #	test/chrono-test.cc

commit a574b21c840339abef5e4ad33612b6efac6ad54b
Author: Paul Dreik <github@pauldreik.se>
Date:   Sat May 4 12:54:13 2019 +0200

    disable chrono fuzzing for now

    it triggers integer overflow and is not trivial to solve.

commit ff17322bceba53e0c2d9ebcf3756115ad148195e
Merge: d6a59851 29c10fbf
Author: Paul Dreik <github@pauldreik.se>
Date:   Sat May 4 07:29:39 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

commit d6a598511c7dc0c208c2d688b2943b0d7c092029
Merge: 663b1592 4a4d72f9
Author: Paul Dreik <github@pauldreik.se>
Date:   Wed May 1 20:44:16 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

    # Conflicts:
    #	test/chrono-test.cc

commit 663b159235f8ae5f58fe80bb02d49bfa392056b0
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Apr 28 22:36:07 2019 +0200

    add crash case (triggers assertion)

commit 082a5cb226142ea30b415d4231cea9425748741a
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Apr 28 21:44:19 2019 +0200

    add const

commit b8d70919ea6be0d2e4c58ef82887496f55125ba9
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Apr 28 21:29:43 2019 +0200

    provoke assertion

    fmt/include/fmt/core.h:246:
    typename std::make_unsigned<_Tp>::type fmt::v5::internal::to_unsigned(Int)
    [with Int = long int;
     typename std::make_unsigned<_Tp>::type = long unsigned int]:
    Assertion `(value >= 0) && "negative value"' failed.

commit e1966013af4eb7febf047d4629cc6236a6aae0e3
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Apr 28 20:46:16 2019 +0200

    add more crashes

commit 1394ae3fe915319ce7dc63d6a9dc820a29c9539e
Merge: 89338cad 4c721e3a
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Apr 28 17:16:14 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

commit 89338cad4eed9441644ec8c5f1687b511c829ea4
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Apr 28 09:40:32 2019 +0200

    add notes on how to reproduce crashes

commit 7dc3e4c7223617da274c4cccb9cf5459d0510e0b
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Apr 28 09:28:20 2019 +0200

    add crashes from chrono duration

commit b62e8bc783134c2d15ebf0372c8a61b41624e6b1
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Apr 28 09:26:53 2019 +0200

    rename fuzzer

commit 7f4ab2b80d072fe3ad96e37e45f3fa807a85c99f
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Apr 28 09:15:38 2019 +0200

    clang format

commit a6cc2a35a9799e88b9ed89e578b7aefd9b09ad09
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Apr 28 09:12:04 2019 +0200

    add chrono duration fuzzer

commit 682713c9a61d52b46e95fdb7d970a8733f77ce88
Merge: 8b934b37 8d8ea21c
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Apr 28 08:07:56 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

commit 8b934b37161d1389de603ced6560982507bb7ae5
Author: Paul Dreik <github@pauldreik.se>
Date:   Sat Apr 27 10:23:44 2019 +0200

    clang format

commit 793d97b9af33269f5628094f547f9771e968e3f2
Author: Paul Dreik <github@pauldreik.se>
Date:   Sat Apr 27 10:23:17 2019 +0200

    tighten memory allocation

commit e2301f2430b15c9817433206597ef82c990f49a0
Author: Paul Dreik <github@pauldreik.se>
Date:   Sat Apr 27 10:19:56 2019 +0200

    clean up and set license (BSD 2-clause simplified, same as fmt)

commit e64c3fb35719afa644dee1f9f17829cace6e17ff
Author: Paul Dreik <github@pauldreik.se>
Date:   Sat Apr 27 10:04:23 2019 +0200

    clean up and add afl

commit ab46241206aaf46759fd3f292ee4a1088b652d15
Author: Paul Dreik <github@pauldreik.se>
Date:   Sat Apr 27 09:54:48 2019 +0200

    drop c++17 requirement

commit 20c01e1acf330c8a28192f55b16efeebddb72ab0
Author: Paul Dreik <github@pauldreik.se>
Date:   Sat Apr 27 09:25:19 2019 +0200

    initial oss-fuzz compatible version

commit 6cbd91a37cf36a1d0e994bb16cf44a12622f7dca
Author: Paul Dreik <github@pauldreik.se>
Date:   Sat Apr 27 08:42:51 2019 +0200

    initial commit of fuzzers from https://github.com/pauldreik/fuzzfmt

commit eaddfb16d86ef1c259b737e2aab40145b0c956a6
Merge: e37d7db3 134904c8
Author: Paul Dreik <github@pauldreik.se>
Date:   Sat Apr 27 08:38:19 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

commit e37d7db3b938c82f569d71e6bb00bd1bf8394db7
Merge: 99b2e08b bd516e34
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Apr 21 17:28:06 2019 +0200

    Merge remote-tracking branch 'upstream/master' into fuzz

commit 99b2e08b6bef25b793df5ef07621c9c4402587de
Author: Paul Dreik <github@pauldreik.se>
Date:   Sun Apr 21 10:30:56 2019 +0200

    stop high memory use when fuzzing
2019-06-30 06:10:07 -07:00
037b84f214 Fix warnings 2019-06-24 16:46:48 -07:00
e37ee419c6 Export exceptions destructors
Reenabling Compiling and Linking as DLL.
2019-06-24 08:53:35 -07:00
e3488fcae2 Fix Warning
QtCreator (4.9) Clang Code Model (Clang 7) gives the
warning:core.h:404:11: error: an attribute list cannot appear here
core.h:116:24: note: expanded from macro 'FMT_NORETURN'
2019-06-24 08:53:35 -07:00
d5d5865615 Move strtod_l check to CMake since it's very system-specific 2019-06-23 17:10:57 -07:00
29ef7d31e4 Fix a warning 2019-06-23 11:09:15 -07:00
af83192d79 Fix warnings 2019-06-23 08:14:15 -07:00
6952732b6c Remove misplaced checks 2019-06-23 06:33:07 -07:00
b97e5d8c2a Remove deprecated fmt/time.h 2019-06-23 06:13:17 -07:00
572b077dbf Fix warnings 2019-06-22 20:52:33 -07:00
72e519a4bd Add formatter<std::string_view> 2019-06-22 20:26:28 -07:00
635e01fe74 Update <format> to the current wording 2019-06-22 13:44:48 -07:00
0e72c98043 Make undocumented output_range internal 2019-06-19 20:08:11 -07:00
f13906f408 back_insert_range<internal::buffer> -> buffer_range 2019-06-19 14:12:29 -07:00
22ddd4b989 Simplify feature checks 2019-06-19 07:46:09 -07:00
bb827341ed Add FMT_FUNC where necessary 2019-06-18 09:48:23 -07:00
64c54703d4 Cleanup 2019-06-17 11:02:18 -07:00
1c3197b8d8 Fix warnings 2019-06-17 09:21:29 -07:00
fd2292f13a Cleanup checked iterators 2019-06-17 08:30:37 -07:00
4912cff65d Fix handling of mapped types in compile checks (#1200) 2019-06-16 16:06:06 -07:00
4639843839 Cleanup 2019-06-15 09:44:51 -07:00
e29708ee57 uintptr -> fallback_uintptr to avoid confusion with uintptr_t 2019-06-14 18:47:36 -07:00
f03a6c5325 Cleanup 2019-06-14 13:38:44 -07:00
6c3d584e67 Simplify warning suppression 2019-06-14 13:03:34 -07:00
12f4683883 Make iterator_t an alias template 2019-06-13 21:32:58 -07:00
874d6727e4 Remove workarounds for pre-C++11 compilers 2019-06-13 20:56:08 -07:00
a9940192fb Fix warnings 2019-06-13 08:56:35 -07:00
34b5418359 Fix warnings 2019-06-13 07:29:10 -07:00
cbbee1b385 Fix handling of hexfloat 2019-06-12 20:53:01 -07:00
92a44db11c Fix warnings 2019-06-12 19:44:08 -07:00
d05d42751c Remove old msvc workaround from arg_formatter_base and fix warning 2019-06-12 19:27:23 -07:00
d32fe0f3f6 Fix hadling of nullptr 2019-06-12 09:22:36 -07:00
e5422db4b2 Fix handling of uintptr_t 2019-06-12 08:16:41 -07:00
9d7b64a259 More cleanup 2019-06-11 22:11:47 -07:00
5e293bd97a Remove unnecessary qualification 2019-06-11 20:36:39 -07:00
4a502d9802 Add remove_reference_t 2019-06-11 20:28:05 -07:00
d384cdd397 Make is_contiguous_back_insert_iterator internal 2019-06-11 20:16:57 -07:00
32544b6108 More cleanup 2019-06-11 19:22:19 -07:00
39f522a13a get_types -> encode_types 2019-06-11 18:50:14 -07:00
d7d2bebf99 Remove redundant typename 2019-06-11 18:29:47 -07:00
9427f15bef Fixed issue with formatting to an array of chars 2019-06-11 18:09:18 -07:00
87fbc6f756 get_type -> mapped_type_constant 2019-06-11 07:23:39 -07:00
a48daa60e5 Remove remove_volatile 2019-06-10 20:25:04 -07:00
afdbbac75c Cleanup 2019-06-10 18:10:26 -07:00
e33fe14f5b Simplify visit 2019-06-10 08:28:39 -07:00
e895da2ec3 Clean up value 2019-06-10 07:58:00 -07:00
e1a67b5285 Remove TODO 2019-06-10 06:54:09 -07:00
a291f07e1a Clean up argument mapping 2019-06-09 22:27:40 -07:00
5d9100fa2f Move char8_t to fmt/core.h 2019-06-08 09:42:11 -07:00
4faadff0a0 Add preliminary user-defined type support 2019-06-08 09:04:46 -07:00
5d48733596 Clean up value construction 2019-06-07 19:27:20 -07:00
0f0b42861b Cleanup 2019-06-07 17:53:25 -07:00
209db68b28 Get rid of FMT_CONSTEXPR11 2019-06-07 14:00:57 -07:00
cb4c59495e Deprecate convert_to_int 2019-06-07 13:38:08 -07:00
40779749ac is_formattable -> has_formatter 2019-06-07 06:51:21 -07:00
b3cf8613b1 Make formatter specializations override implicit conversions 2019-06-07 06:25:46 -07:00
3fdba04924 Reduce the number of nontrivial formatter instantiations 2019-06-06 22:02:53 -07:00
f5f3ffac59 Merge string make_value overloads 2019-06-06 08:29:16 -07:00
a38b99a188 Fix a regression in named argument handling introduced by prepare 2019-06-05 16:50:04 -07:00
aa31028b2c char_t_impl -> char_t 2019-06-05 10:13:34 -07:00
0787d69747 Simplify SFINAE 2019-06-05 09:02:33 -07:00
bae00aa8d7 Simplify is_string 2019-06-05 08:41:00 -07:00
388bb389e6 integral_constant -> bool_constant 2019-06-05 08:14:47 -07:00
7e39c7e6f4 Put stringy stuff together 2019-06-05 07:43:20 -07:00
3eff8f94d2 Update docs 2019-06-05 06:24:18 -07:00
469a4bbd35 Use enable_if_t 2019-06-04 21:38:18 -07:00
d2ee5f2407 Merge tests 2019-06-04 21:31:23 -07:00
c264e641ea Add conditional_t for pre-C++14 2019-06-04 18:50:30 -07:00
4aa0dc578b Fix docs 2019-06-04 18:02:55 -07:00
064ce6b6c0 Specialize is_char for character types 2019-06-04 17:08:58 -07:00
7893d85394 Clarify why we cannot have nice things 2019-06-04 08:47:25 -07:00
5bafcb437b Add comments about things broken in MSVC 2019-06-03 19:14:16 -07:00
1530242551 Fix signature in the docs 2019-06-03 17:35:15 -07:00
eddb84cfc0 Fix formatting of exotic characters 2019-06-03 17:08:00 -07:00
7e42c65bb6 Document a more useful to_string_view overload 2019-06-03 11:57:33 -07:00
1e6e87cb74 Update docs 2019-06-03 11:35:12 -07:00
0c6a6e0250 Get rid of the FILE* hack and reword apidocs 2019-06-03 10:27:00 -07:00
1653244c69 Fix compilation issue on VS2019 (#1186) (#1191) 2019-06-03 08:34:27 -07:00
d54e64b3c8 Make buffer_context an alias template 2019-06-02 18:28:49 -07:00
ec6651087d Remove old is_constructible workarounds and replace typedefs with using 2019-06-02 16:46:45 -07:00
4d4b8c238d FMT_CHAR -> char_t 2019-06-02 15:03:37 -07:00
56d2b91108 Install git 2019-06-02 13:57:19 -07:00
89d6c959b2 Fix cmake link 2019-06-02 13:24:32 -07:00
76ef39fc50 Update vagrant config 2019-06-02 13:19:33 -07:00
af2c73772c Implement parsing of string_views 2019-06-02 11:11:28 -07:00
9df0e2d1f1 Implement string parsing 2019-06-02 07:39:38 -07:00
5b7bbf8853 Revert "FMT_CHAR -> char_t"
This reverts commit 4c650057a0.
2019-06-01 15:01:04 -07:00
4c650057a0 FMT_CHAR -> char_t 2019-06-01 12:32:24 -07:00
2833c76f22 Move char_t to template param to reduce symbol size 2019-06-01 12:14:27 -07:00
67feef5589 Make enable_if_t more std-like and move to fmt namespace 2019-06-01 10:05:16 -07:00
78daa50ffc Fix handling of chrono durations with minimal signed rep 2019-06-01 09:36:37 -07:00
87e4ea2906 Fix a warning 2019-06-01 08:24:36 -07:00
c56b17029a Add msvc2019 to CI 2019-06-01 07:50:15 -07:00
c929684e33 inlines count_code_points(basic_string_view<char8_t)
count_code_points(basic_string_view<char8_t>) was defined in
fmt/format-inl.h, and only declared in fmt/format.h, but not defined
in src/format.cc. This commit moves the overload to fmt/format.h and
inlines it.
2019-06-01 07:17:22 -07:00
f57227a148 FMT_ENABLE_IF -> enable_if_t 2019-05-31 20:09:19 -07:00
634f707f2b Simplify char_t and remove msvc2013 from CI 2019-05-31 19:28:37 -07:00
406e632bd1 result_of -> invoke_result_t 2019-05-31 08:54:32 -07:00
49f78a427b Demacrify 2019-05-30 21:30:29 -07:00
637bf3c6d9 Workaround a bug in clang-format 2019-05-30 11:46:31 -07:00
8302c2f33b fmt::internal::declval -> std::declval 2019-05-30 09:46:10 -07:00
d07cc2026b FMT_EXPLICIT -> explicit, FMT_NULL -> nullptr 2019-05-30 07:42:36 -07:00
4a7966c773 Drop gcc 4.4 from CI 2019-05-30 06:51:59 -07:00
9b3c24b99b One weird trick to simplify docs; doxygen hates it 2019-05-29 21:09:43 -07:00
30bce6c14c Fix a few chrono formatting corner cases (#1178) 2019-05-29 18:02:26 -07:00
e5512c5d57 Use static_assert instead of SFINAE in arg(...) 2019-05-29 13:21:24 -07:00
afc571aedc Document join and relax its compiler requirements 2019-05-29 11:21:05 -07:00
ad360a62b0 add gcc 8 c++17 release build 2019-05-29 06:50:43 -07:00
3cf12d7b11 add gcc 8 c++17 build 2019-05-29 06:50:43 -07:00
bb254d146b Disable std-format-test by default 2019-05-27 20:02:08 -07:00
291ba837f2 Remove wrong compile-time checks from printf (#1173) 2019-05-24 07:50:13 -07:00
01c631af95 Implement unsigned and long long parsing 2019-05-19 07:34:54 -07:00
4fcd4a4bd0 Reuse parse_format_string in scan 2019-05-18 14:18:06 -07:00
2346779d6b More documentation fixes 2019-05-18 09:30:36 -07:00
afc1a74a6c Minor documentation fixes 2019-05-18 09:10:17 -07:00
ad0eade471 Remove MSVC nonsense 2019-05-18 09:05:19 -07:00
28c187bcd7 Capitalize titles 2019-05-18 08:56:49 -07:00
91bb3aaf06 fmtlib.net -> fmt.dev 2019-05-17 15:42:00 -07:00
5e7bdf1b97 Clean up vagrant config 2019-05-16 12:22:04 -07:00
570453f271 Add a vagrant config for testing gcc 4.4 2019-05-16 06:26:16 -07:00
ef6282fc45 Fix gcc 4.4 build 2019-05-15 22:37:00 -07:00
e3e470bb69 Remove deprecated format_decimal 2019-05-15 10:34:45 -07:00
67179dbc23 Remove deprecated format_decimal 2019-05-15 10:34:38 -07:00
a5ffa735db Fix gcc 4.4 build 2019-05-15 10:20:51 -07:00
5ee0804631 Experiment with scan API 2019-05-15 10:02:40 -07:00
25b72fc4cd Move <format> to tests not to confuse users 2019-05-15 09:08:42 -07:00
d179ec5f8b Simplify Grisu 2019-05-15 08:40:21 -07:00
2a9e8b52de Fix advance_to() and begin() using iterator (#1159) 2019-05-14 08:41:11 -07:00
2c77562b13 Fix ambiguous formatter specialization in fmt/ranges.h (#1123) 2019-05-12 13:03:20 -07:00
98b3775297 Add support for exotic string_view iterators (#1156) 2019-05-12 11:07:49 -07:00
b488df6cfe Fix Grisu3 stopping conditions 2019-05-12 08:56:50 -07:00
f4dfd6e30f Suppress all clang-target-msvc test warning in CMake and other misc fixes (#1151)
* Fix conditional `char8_t` from `format.h` and fix `-Wunused-result` of [[no_discard]] begin() when in c++17

* Suppress `-Winconsistent-dllimport` when in clang-target-msvc

* Suppress warning _CRT_SECURE_NO_WARNINGS in MSVC and -Wdeprecated-declarations

Suppress warning _CRT_SECURE_NO_WARNINGS in MSVC and -Wdeprecated-declarations of POSIX functions in Clang target MSVC.
Those functions are used by gtest.

* Remove FMT_FUNC, mark FMT_API to export
2019-05-11 11:48:27 -07:00
a6e8ed15c4 Disable UDL templates on GCC 9 by default (#1148) 2019-05-11 08:58:39 -07:00
de5da50910 Fix formatting of extreme durations (#1154) 2019-05-11 08:42:02 -07:00
ea2976e6d5 Move internal::uintptr_t test to format-impl-test (#1152) 2019-05-11 06:58:22 -07:00
77d6036cd5 Fix unexpected trailing decimal point (#1153) 2019-05-11 06:34:47 -07:00
ccc318e807 Update README.rst 2019-05-10 10:04:44 -07:00
4c8efd694c Update README.rst 2019-05-10 09:56:40 -07:00
d22d11b5ff Update README.rst 2019-05-10 09:54:42 -07:00
e9bab6d028 Improve handling of large durations 2019-05-08 12:40:33 -07:00
f52c09f924 Fix format_to_n docs in 5.1.0 2019-05-08 12:40:25 -07:00
118d8bccc2 Fix compilation error under MSVC 19.21 (#1140) 2019-05-08 11:20:55 -07:00
6828d549e8 Add FMT_ENABLE_IF_T
for definitions of functions which declared using FMT_ENABLE_IF
2019-05-08 11:20:55 -07:00
3fd134be03 Move test_count_digits to format-impl-test and disable gtest warnings (#1147)
* This translation unit includes `gtest.h` in which using something like `strncpy`

Suppress MSVC warnings from `gtest.h` included.

Warning sample:
fmt-master\test\gtest\gtest.h(2873,10): warning: 'strncpy' is deprecated: This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]

* Moving `test_count_digits` to format-impl-test then count_digits<4>(internal::uintptr_t) shall not be exported

* retaining _CRT_SECURE_NO_WARNINGS always defined should be no harms.
2019-05-07 12:09:11 -07:00
ca7c1f89dc Fixed a compile error under MSVC.
The #warning directive is not supported by MSVC.
To still get a message to the user we use #pragma message() under MSVC now.
2019-05-05 14:04:04 -07:00
ca978b3d21 Fix handling of nan durations 2019-05-05 08:53:23 -07:00
c1d430e61a Improve handling of negative durations 2019-05-04 17:52:20 -07:00
38a85502ed Use the same rep type for seconds to prevent overflow 2019-05-04 09:22:09 -07:00
241414028d Eliminate shadowed variable warnings from gcc-7.2
The gcc-7.2.0 compiler (and others) were giving shadowed variable warnings for this include file.  A simple renaming of a couple local variables eliminates the warnings.
2019-05-04 08:00:31 -07:00
29c10fbf6e Fix DLL visibility of explicit instantiation "declaration" of internal::basic_data<void> in header format.h and the explicit instantiation "definition" in format.cc (#1134)
* Update format.cc

As the explicit instantiation *declaration* of `internal::basic_data<void>` in format.h, this explicit instantiation *definition* should mirror FMT_API also.

* Mirror visibility of explicit instantiation declaration 

explicit instantiation declaration of internal::basic_data<void> should mirror visibility of FMT_API

* Eliminate `__declspec(dllexport)` designation on extern template internal::basic_data<> when `extern` affected during exporting phase.

* Add `FMT_EXTERN_TEMPLATE_API` for designate DLL export `extern template`

When exporting DLL, do not designate `__declspec(dllexport)` any template that has any explicit class template declaration a.k.a. `extern template`. Instead, designate `__declspec(dllexport)` at single point where we have explicit class template definition a.k.a. normal instantiation without `extern`

Note: this is a c++11 feature.

* Delete whole `FMT_USE_EXTERN_TEMPLATES` block and its condition

1. Remove whole `FMT_USE_EXTERN_TEMPLATES` block
(trailing `FMT_UDL_TEMPLATE` block)
````
#ifndef FMT_USE_EXTERN_TEMPLATES
#  ifndef FMT_HEADER_ONLY
#    define FMT_USE_EXTERN_TEMPLATES                           \
      ((FMT_CLANG_VERSION >= 209 && __cplusplus >= 201103L) || \
       (FMT_GCC_VERSION >= 303 && FMT_HAS_GXX_CXX11))
#  else
#    define FMT_USE_EXTERN_TEMPLATES 0
#  endif
#endif
````

2. Delete `FMT_USE_EXTERN_TEMPLATES` condition, only condition, that trailing basic_data class template definition.
````
#if FMT_USE_EXTERN_TEMPLATES
extern template struct basic_data<void>;
#endif
````

3. Replace `FMT_API` with new `FMT_EXTERN_TEMPLATE_API` added in `core.h` for sake of extern template of `basic_data<void>`

* Add `#define FMT_EXTERN extern` only when not `FMT_HEADER_ONLY`

* Replace `extern` on basic_data<void> with the `FMT_EXTERN` condition in core.h

* replace misspelled if !define() with ifndef
2019-05-02 07:49:01 -07:00
4a4d72f917 Fix handling of invalid string in chrono formatting 2019-05-01 10:06:42 -07:00
b3cc9c0567 Merge remote-tracking branch 'upstream/master' into invalidcolons
# Conflicts:
#	test/chrono-test.cc
2019-04-28 21:35:21 +02:00
2e3352fd05 provoke assertion
fmt/include/fmt/core.h:246:
typename std::make_unsigned<_Tp>::type fmt::v5::internal::to_unsigned(Int)
[with Int = long int;
 typename std::make_unsigned<_Tp>::type = long unsigned int]:
Assertion `(value >= 0) && "negative value"' failed.
2019-04-28 21:34:09 +02:00
4c721e3a2f Fix chrono formatting with invalid argument id (#1132) 2019-04-28 07:08:41 -07:00
8d8ea21c69 Partially implement Grisu3 2019-04-27 12:17:21 -07:00
40a7975640 Remove trailing zeros 2019-04-27 07:42:27 -07:00
cb46397dfb Fix typo 2019-04-27 07:13:35 -07:00
134904c886 Re-enabled constexpr tests 2019-04-26 17:07:37 -07:00
bd516e3429 Convert negative precision to zero in printf (#1127)
and remove redundant check in grisu2_prettify.
2019-04-21 07:44:04 -07:00
5efb24dd2b Add specialization test 2019-04-19 17:15:46 -07:00
946498cfbc Fix handling of zero precision 2019-04-19 15:10:12 -07:00
6b20863918 fmt::ptr: support unique_ptr and shared_ptr. 2019-04-18 10:12:11 -07:00
d306585a3f Don't inject internal names into std (#1120) 2019-04-17 13:25:31 -07:00
544b927933 Don't detect C compiler 2019-04-17 06:18:53 -07:00
dc94010fa5 Remove char_traits (#1117) 2019-04-16 17:08:24 -07:00
397e8dd9d5 clang-format 2019-04-15 11:39:19 -07:00
2b415b7af7 Restructure printf_arg_formatter to make it customizable 2019-04-15 11:10:31 -07:00
5d755d0a4e Fix handling of volatile char (#1115) 2019-04-14 12:34:56 -07:00
bade46aae5 Optimize grisu using uint128_t 2019-04-13 13:44:41 -07:00
41fbaeb3b1 Add <format> test 2019-04-13 11:37:52 -07:00
8bc0adb9ba Get rid of obsolete cmake stuff 2019-04-13 11:37:52 -07:00
1763d0e7a2 Add MongoDB to "Projects using this library" 2019-04-12 15:52:04 -07:00
f569c1ba28 doc fix: time -> chrono
Change refs to fmt/time.h -> fmt/chrono.h
RST label rename time-api -> chrono-api
2019-04-12 14:51:32 -07:00
ccd70f59ee Workaround bogus unreachable warnings in MSVC 2019-04-11 17:59:35 -07:00
a4969ebe06 Link to fmt(...) docs from index 2019-04-10 19:22:10 -07:00
a6ad29aa34 Update <format> 2019-04-10 09:09:34 -07:00
52eb3fe274 Update <format> 2019-04-10 08:29:07 -07:00
09e2ac5e46 Update <format> 2019-04-10 07:56:50 -07:00
df4ea0c76c Update <format> 2019-04-10 06:25:42 -07:00
718f60accb Fix shadowing warning (#1105) and clang format 2019-04-08 19:14:32 -07:00
aeb5ad3ce1 Enable [[noreturn]] some. 2019-04-08 07:53:59 -07:00
2808395481 basic_buffer -> buffer
This reduces symbol sizes and gets rid of shadowing warnings.
2019-04-07 20:32:28 -07:00
6e37c20030 Use compile features cxx_auto_type cxx_variadic_templates instead of cxx_std_11 2019-04-07 08:47:17 -07:00
3de3d76a36 Add compile features for cmake 3.8+ 2019-04-07 08:47:17 -07:00
07d5a86a7c Fix warnings 2019-04-06 22:10:10 -07:00
ab1474ef66 Workaround segfault in doxygen and apply clang-format 2019-04-06 15:55:14 -07:00
918ab77baa Try fixing doc build 2019-04-06 10:04:56 -07:00
735b1fadc3 Only update key on Linux 2019-04-06 09:49:35 -07:00
3c531b735b Fix expired key error when installing with apt
Error:
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packagecloud.io/github/git-lfs/ubuntu trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6B05F25D762E3157
W: http://ppa.launchpad.net/couchdb/stable/ubuntu/dists/trusty/Release.gpg: Signature by key 15866BAFD9BCC4F3C1E0DFC7D69548E1C17EAB57 uses weak digest algorithm (SHA1)
W: Failed to fetch https://packagecloud.io/github/git-lfs/ubuntu/dists/trusty/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6B05F25D762E3157
W: Some index files failed to download. They have been ignored, or old ones used instead.
2019-04-06 09:32:38 -07:00
f10a7e2e46 Test exotic pointer formatting 2019-04-06 09:04:44 -07:00
bd8177177a Add support for platforms without uintptr_t 2019-04-06 08:11:03 -07:00
0302927f56 Optimize pointer formatting 2019-04-05 20:36:37 -07:00
bb6842ba35 Simplify to_string 2019-04-05 19:15:22 -07:00
b23c8633fa Detect presence of uintptr_t 2019-04-05 07:43:00 -07:00
b588d7f35f Fix a couple of deprecated things. 2019-04-04 16:26:22 -07:00
018d8b57f6 Remove broken snprintf 2019-03-30 20:27:52 -07:00
1987db663b clang-format 2019-03-30 07:48:53 -07:00
a6d1ad741d handle fwrite results #1098 2019-03-30 07:48:53 -07:00
e979c782d3 Extend basic_writer with write() method for doubles with optional format_specs argument 2019-03-25 19:16:41 -07:00
9e1531c1e1 install pkg-config file into libdir
Most pkgconfig files contain a Libs: variable, which is either /usr/lib
or /usr/lib64. If a 32bit and a 64bit variant of fmt libraries is
installed, the last one wins. As a result compiling for the other
bitsize will fail.

Instead of sharedir use libdir as install target.

Fixes commit 9d0c9c4bb1
Fixes commit 287342dab1

Signed-off-by: Olaf Hering <olaf@aepfle.de>
2019-03-25 19:15:35 -07:00
0a66e4cbbb Update README.rst 2019-03-24 11:37:07 -07:00
91acfe6852 Fix UBSAN warning 2019-03-22 07:56:02 -07:00
b7e6bf9671 clang format 2019-03-21 20:51:37 -07:00
da0ea4161a Make compile-time checks work with fallback formatter (#1088) 2019-03-21 19:26:53 -07:00
7ad3015f5b Added missing typename to FMT_STRING. (#1089)
* Added missing typename to FMT_STRING.

This is so that FMT_STRING can be used in a template.
2019-03-20 20:37:00 -07:00
f0b572da05 Update wording test 2019-03-20 06:53:31 -07:00
6d416cf674 Forward declare is_string<FILE*> specializations 2019-03-19 05:20:18 -07:00
b742f622ab Create PR template to help agree to the licensing terms (#1083) 2019-03-18 14:41:17 +01:00
02a6f16b52 Update LICENSE.rst 2019-03-17 18:49:12 -07:00
294fd7df96 Remove isinf workaround 2019-03-17 14:49:19 -07:00
17c6900f83 Update docs 2019-03-17 14:15:48 -07:00
0faa968cc3 Make floating-point formatting locale-independent 2019-03-17 13:26:56 -07:00
bc784d3625 Remove isnan workaround 2019-03-17 12:23:36 -07:00
53379dfd0c Don't set CMAKE_BUILD_TYPE if fmt is a subproject (#1081) 2019-03-17 10:50:40 -07:00
76d326a2a2 Enable grisu for general format 2019-03-17 09:48:50 -07:00
c21c6b8c4b Move enable_if to template params 2019-03-16 15:15:38 -07:00
ec645ca262 Update readme and doxygen config 2019-03-16 10:47:50 -07:00
ae0b0dab9f Remove obsolete TODO 2019-03-16 10:04:16 -07:00
5466a5b41f Document inherited members 2019-03-16 08:22:16 -07:00
9b392a683d Update readme 2019-03-16 07:59:58 -07:00
0fa65cf329 Add example 2019-03-16 07:36:27 -07:00
fdd0149e71 Update readme 2019-03-16 07:27:53 -07:00
e19a95b271 Update readme 2019-03-16 06:51:35 -07:00
ef39274973 Update readme 2019-03-16 06:47:18 -07:00
a7f68dcc01 Update readme 2019-03-16 06:46:19 -07:00
1428b34299 Update readme 2019-03-16 06:30:50 -07:00
97619e27a2 More fixed precision tests 2019-03-15 10:20:20 -07:00
dd6cc0e6ac Merge time-test into chrono-test 2019-03-14 18:10:56 -07:00
a939c75956 Merge fmt/time.h into fmt/chrono.h 2019-03-14 18:07:42 -07:00
17e4b53926 Make chrono formatting work without exceptions (#1062) 2019-03-14 18:01:03 -07:00
a82b3680dc More tests and fixed precision fixes 2019-03-13 19:47:07 -07:00
287342dab1 cmake: default FMT_PKGCONFIG_DIR to a relative path 2019-03-13 11:28:50 -07:00
e28429ee73 Prevent overflow with zero precision 2019-03-13 10:46:25 -07:00
49bbf3c876 Simplify shadowing warning fix 2019-03-13 08:29:37 -07:00
5e5506f833 Update readme 2019-03-12 06:08:18 -07:00
e06523361d Visual Studio 2017: warning C4456: declaration of 'result' hides previous local declaration 2019-03-11 14:15:23 -07:00
ebec00138b Reword licensing part 2019-03-10 17:42:36 -07:00
8daa3c6834 Clarify contribution licensing
This is similar to https://github.com/apple/swift/blob/master/CONTRIBUTING.md
with an explicit clause that allows changing license for #1073.
2019-03-10 17:38:26 -07:00
0d418a8d58 Update and rename CONTRIBUTING.rst to CONTRIBUTING.md 2019-03-10 17:25:06 -07:00
4c66dad8c1 Refactor digit generation 2019-03-10 15:45:06 -07:00
b1f7cca89e stop -> handler and swap args 2019-03-10 14:43:26 -07:00
f90d33ca12 error_ulp -> error 2019-03-10 14:29:28 -07:00
78c755dc48 Update readme 2019-03-10 12:17:35 -07:00
f230170157 Update readme 2019-03-10 12:13:14 -07:00
ced8aa8c9e Update readme 2019-03-10 12:07:57 -07:00
77d54251f0 Update benchmark results 2019-03-10 11:21:24 -07:00
1632f72cbe Test get_round_direction 2019-03-10 11:14:50 -07:00
8129b9bc46 Test that the library can be compiled witout locales 2019-03-10 07:57:29 -07:00
835087dd04 Add color-test 2019-03-10 07:57:29 -07:00
4523053e6f Fix typos. 2019-03-10 07:49:33 -07:00
8407f4cb24 Round close to zero fixed precision 2019-03-09 15:18:34 -08:00
49d244c065 Don't emit more than precision digits (#1072) 2019-03-09 13:53:23 -08:00
3466d9c845 Don't override fixed formatting depending on exponent (#1072) 2019-03-09 13:22:07 -08:00
93d22dec35 Implement rounding up and clean up FP formatting 2019-03-09 10:40:36 -08:00
d560ddac25 Temporarily disable Grisu for fixed formatting 2019-03-08 19:09:05 -08:00
2d981bb133 Add documentation for '%' format type. (#1071) 2019-03-06 11:50:32 -10:00
d8434baa03 Declare the size of RESET_COLOR.
This is so that the format with a text_tyle will compile even if
header-only mode isn't enabled. Addresses #1063.
2019-03-06 09:41:45 -10:00
8f7780a4f6 Correct comment 2019-03-06 09:23:16 -08:00
2e526a664a Fix handling of output iterator in ranges 2019-03-06 08:10:46 -08:00
79b79f329e Add support for '%' type to output floating point values as a
percentage.

This helps with compatibility with Python's format strings.
2019-03-05 17:36:20 -08:00
287eaab3b2 Increment output iterator in basic_writer::write for character types (#1056) 2019-02-26 12:16:34 -10:00
a97757736b Use grisu for fixed precision 2019-02-23 15:50:50 -10:00
327d4b6e9e Fixes for some pedantic warnings (#1054)
* Fix order of initializers

* Remove unused parameter

* Disable warning "-Wswitch-enum"
2019-02-23 09:40:08 -10:00
8af651be39 Implement fixed precision 2019-02-22 10:47:27 -10:00
187bd1b8b2 Clarify lifetimes of named_arg parameters (#1051)
* Clarify usage of fmt::arg

Document that fmt::arg takes a non-owning
reference, even if that reference is to
a temporary. As such, users should make sure
the lifetime of the reference lasts as long
as the named argument.

* Clean up language

Remove mentions of `std::reference_wrapper` and rvalues
in favor of more common terminology like dangling references.
2019-02-22 06:37:19 -10:00
4e5694fd05 Update arg signature 2019-02-21 17:38:30 -10:00
82c24edcf6 Workaround a bogus Qt Creator warning 2019-02-19 06:33:55 -10:00
ed138d794a test: assert-test: fix typo in else-branch of EXPECT_DEBUG_DEATH_IF_SUPPORTED
Patch by Ievgen Liubymkin (jackyf).
2019-02-18 14:02:02 -10:00
0476a51cba Add Sublime syntax (#1037) 2019-02-15 15:08:58 -08:00
c5aad69f2a Restore deprecated begin() 2019-02-15 15:00:02 -08:00
5b0006476a Make stopping condition configurable in grisu 2019-02-14 18:25:13 -08:00
a44238f2ef Improve grisu 2019-02-13 20:03:27 -08:00
83808076e3 Minor cleanup 2019-02-13 19:28:02 -08:00
9660ea1bff Simplify format string checks 2019-02-10 18:00:19 -08:00
4a9d676362 Gradle 4.10 >> Gradle 5.2
TravisCI
- replaced from manual Gradle download to install with 'sdkman'
- changed build name

Gradle
- updated build tool version
2019-02-10 16:15:32 -08:00
f041f128f5 Minor cleanup 2019-02-10 15:20:40 -08:00
e4572e5def Update std implementation 2019-02-10 07:56:33 -08:00
442fa1bd46 Decouple format and parse contexts 2019-02-09 20:39:37 -08:00
744e66bb08 Deprecate format_context::parse_context() 2019-02-09 16:15:20 -08:00
d231d68a8b Fix handling of custom context 2019-02-09 07:36:09 -08:00
01f34d0b0b Fix library deprecation warning
Since C++17, using template specialization 'std::allocator<void>' in any shape or form (even just mentioning it) is deprecated! A simple workaround is replacing 'void' by another (preferably empty) type, e.g. 'fmt::monostate'.

Found by Clang 9 in Visual Studio.
2019-02-07 12:20:46 -08:00
9a0a24f90b Test is_streamable with overloaded comma operators 2019-02-06 15:44:59 -08:00
430e6ac9b6 Protect against overloaded comma operators in decltype 2019-02-06 15:44:59 -08:00
467520e7a4 Remove unused macro 2019-02-06 11:34:59 -08:00
5a314a5288 Eliminate extra copy on floating-point formatting 2019-02-06 10:17:50 -08:00
9989e7f4e3 Update benchmark results 2019-02-04 17:56:33 -08:00
31510cb437 Fix warnings from Visual Studio
Name hiding.

Signed-off-by: Daniela Engert <dani@ngrt.de>
2019-02-04 11:58:56 -08:00
61c9b563c2 Replace 'std::result_of' by 'std::invoke_result' where possible (#1025)
C++17 deprecated 'std::result_of' in favour of 'std::invoke_result' and will ban it outright in C++20. Therefore
- implement 'internal::result_of' in terms of 'std::invoke_result' when compiling C++17 mode.
- implement 'internal::result_of' in terms of 'std::result_of' when compiling in modes C++11 or C++14.

Signed-off-by: Daniela Engert <dani@ngrt.de>
2019-02-04 11:25:22 -08:00
864b9a2202 Correct the comment 2019-02-04 08:29:39 -08:00
1538336836 Remove unnecessary checks 2019-02-04 08:25:41 -08:00
22de5a755f Fix warnings from Travis 2019-02-03 15:25:09 -08:00
355eb6d29a Enable grisu for shortest roundtrip (default) formatting 2019-02-03 10:38:28 -08:00
b8d34e0db3 Fix rounding 2019-02-02 09:19:46 -08:00
e61cac687d Minor grisu improvements 2019-02-02 07:41:52 -08:00
7fbbfed8c6 Fix warnings caused by usage of deprecated functionality 2019-02-02 05:48:39 -08:00
c3268f4e50 Remove use cases of deprecated functionality 2019-02-02 05:48:39 -08:00
34951f1999 Replace comments regarding deprecation with attributes 2019-02-02 05:48:39 -08:00
3f52336e6c Simplify formatter selection 2019-01-30 19:39:42 -08:00
7ca8fc3b17 Fix a bogus warning 2019-01-30 07:06:40 -08:00
5289dd600b Test formatting of special numbers 2019-01-30 06:56:46 -08:00
bf6529f2ce Update docs 2019-01-30 06:07:59 -08:00
0700612249 Implement 'chrono' formatting specifiers '%Q' and '%q'
Howard Hinnant's 'date' library recently gained these two new formatting specifiers. This implementation in {fmt} includes support for 'std::chrono::duration' specializations with floating-point representation types and user-definable precision.

Signed-off-by: Daniela Engert <dani@ngrt.de>
2019-01-27 11:10:08 -08:00
06c005b7b0 Clarify that compile-time checks don't support named arguments 2019-01-27 10:10:13 -08:00
4f6fda558c Add a grisu test stub 2019-01-27 10:10:13 -08:00
9f70b034e1 Implement precision for floating-point durations.
The formatting syntax follows p1361r0, augmented by a precision field as proposed in #1004.

Signed-off-by: Daniela Engert <dani@ngrt.de>
2019-01-23 07:17:00 -08:00
7cdb1e5e40 Workaround broken is_default_constructible in MSVC 2019-01-21 10:54:49 -08:00
5f1ceebc7f Make formatter<T> override ostream<< for templates (#952) 2019-01-21 09:42:55 -08:00
1b11b000c7 Update readme 2019-01-20 15:33:30 -08:00
83f052930a Add code from p0645 2019-01-20 15:12:01 -08:00
fdd8e333c1 Fix compilation with locales disabled (#1011) 2019-01-19 07:16:05 -08:00
dad1eec842 Workaround unimplemented T... on gcc 4.6.x (#1008) 2019-01-16 11:41:20 -08:00
b0cde860ae Implement 'snprintf(OutputIt it, size_t n, const S &format, const Args & ... args)' (#917)
Mostly equivalent to 'sprintf(const S &format, const Args & ... args)' but generates at most 'n' characters through output iterator 'it'. The output type is the same as with 'format_to_n'.

Signed-off-by: Daniela Engert <dani@ngrt.de>
2019-01-13 13:08:01 -05:00
e05dfb0887 Fix compile errors due to name-hiding and an unused function argument.
These problems are pointed out by clang-tidy and fail compilation on msvc at /W4 /WX.

Signed-off-by: Daniela Engert <dani@ngrt.de>
2019-01-13 12:18:05 -05:00
dde095fab8 Revert "Reorder defines"
This reverts commit 4a059914a9.
2019-01-13 08:13:38 -08:00
4a059914a9 Reorder defines 2019-01-13 07:40:37 -08:00
58b6f8db48 Format the code using clang-format 2019-01-13 06:58:20 -08:00
9a777b9e1c Implemented fmt::prepare()
Implementation of fmt::prepare() function and features around it.
2019-01-12 10:53:31 -08:00
da55e96f53 Install ninja to fix android build 2019-01-09 15:55:29 -08:00
dc8f8ce4c0 Fix handling of dynamic width in chrono formatter
Thanks to Howard Hinnant.
2019-01-09 15:23:21 -08:00
f5cc77cea0 Get rid of 'null_terminating_iterator' in printf.h (#980)
The iterator class itself and its helpers 'to_pointer' are removed after reformulating the formatting loop in terms of a 'basic_string_view<Char>::iterator'.

Signed-off-by: Daniela Engert <dani@ngrt.de>
2019-01-04 12:18:14 -05:00
39623a7400 Replaced usage of gtest's internal scoped_ptr with unique_ptr.
scoped_ptr was removed in with gtest google/googletest@e857f9cdd9.
2019-01-02 19:05:51 -05:00
ae1de3a8d3 Add support for using text_style in format and vformat directly (#993)
* Closes #993
2019-01-01 09:26:54 -05:00
1b8a216ddf Improve docs 2018-12-28 15:05:42 -08:00
b3ad759a0a Bump version and correct changelog 2018-12-28 13:09:31 -08:00
9e554999ce Update version 2018-12-28 12:31:41 -08:00
b34d92b051 Bump version 2018-12-28 12:23:29 -08:00
d39ece1870 Make rst2md runnable and update changelog 2018-12-28 12:04:34 -08:00
fe2d715ff1 Update changelog 2018-12-24 11:56:48 -08:00
27b306701f Update changelog 2018-12-24 11:51:20 -08:00
68837079aa Update changelog 2018-12-24 11:48:41 -08:00
c98b202eb4 Update changelog 2018-12-24 11:47:06 -08:00
587a7f6634 Update changelog and docs 2018-12-24 10:56:13 -08:00
84e5170c9c Update changelog and deprecate visit 2018-12-24 10:02:41 -08:00
130e412b64 Update changelog and docs 2018-12-24 09:37:52 -08:00
0bbdca5b8b Fix conversion warnings (#989)
* Fix sign conversion warnings

* Ignore unused local typedefs

* Remove cast reported as useless on GCC

* Remove warning on unused variable

* Enable conversion warning checking for pedantic build

* Fix sign-conversion warnings in headers
2018-12-20 06:24:19 -08:00
77a7244804 Implement fill/align/width for strftime-like formatting 2018-12-19 07:03:02 -08:00
3e01376e08 Implement fill/align/width parsing in chrono formatter 2018-12-16 09:08:11 -08:00
1f92f8a9d8 Remove noexcept 2018-12-15 06:41:32 -08:00
8668639ae2 Get rid of null_terminating_iterator in format 2018-12-15 06:17:25 -08:00
93fd473b8f Add support for builtin terminal colors. (#974) 2018-12-15 06:16:00 -08:00
61ad543c3e Windows .sln filename changed from FORMAT to FMT 2018-12-14 07:50:54 -08:00
7f7504b3f5 Clean up docs 2018-12-12 18:21:13 -08:00
37f599b1a1 Fix docs 2018-12-12 17:50:50 -08:00
8c2e15aed5 Make printf work in search (#164) 2018-12-12 16:07:54 -08:00
de71db6d42 Fix asan error (#977) 2018-12-12 11:29:39 -08:00
b180b39152 Fix default formatting 2018-12-12 06:39:47 -08:00
24594c747e Disable printing the reset escape code when no style modifiers where applied. (#973) 2018-12-09 15:57:20 -08:00
b0f2224719 Implement default chrono formatting 2018-12-09 15:56:15 -08:00
749276072f Add file stream support for stylized text printing. (#967) 2018-12-09 09:28:48 -08:00
f54f3d0fb7 Move chrono-specific code to a separate header 2018-12-09 06:45:20 -08:00
bf1f1c73e3 Fix time test 2018-12-07 08:19:13 -08:00
b6bc6ec246 Add default ctor and fix use of constexpr macros in text_style 2018-12-07 07:22:18 -08:00
acfa95d4a8 Workaround a bug in MSVC's strftime (#965) 2018-12-07 07:07:21 -08:00
628f830583 More chrono formatting 2018-12-07 06:36:08 -08:00
aa3b5aba41 Implement locale-specific minute formatting 2018-12-06 16:12:10 -08:00
639de21757 Workaround more MSVC bugs 2018-12-06 12:16:04 -08:00
3242ddf7b5 Fix warnings 2018-12-06 08:16:12 -08:00
bd1104046b Workaround a bug in MSVC 2018-12-06 08:16:01 -08:00
81b5c4a5fd Add experimental emphasis support (#961) 2018-12-06 07:56:01 -08:00
7c4eb0fbeb Fix warnings in time.h 2018-12-05 14:38:08 -08:00
2d624218bf Fix another warning 2018-12-05 10:19:53 -08:00
b31680990e Fix a warning 2018-12-05 09:49:39 -08:00
b10ccb83e1 Add rpclib to projects 2018-12-05 06:42:33 -08:00
0497875ff3 Stop the orgy of casts 2018-12-05 06:27:31 -08:00
37dc495b9d Simplify MSVC workaround 2018-12-05 06:22:18 -08:00
2ff4996d05 Fix ambiguous complier error C2666 in vs2017.The '+' opeator may cause ambiguity.Avoid implicit conversion. 2018-12-05 05:55:43 -08:00
77656c672c Fix sign-conversion warnings reported by Clang7 2018-12-03 16:22:59 -08:00
ea5e4790bd Fix formatting 2018-12-03 08:58:48 -08:00
86681c4bb0 Update README.rst 2018-12-03 08:04:21 -08:00
e867768ee6 Do not override user provided compile flag 2018-12-03 07:31:19 -08:00
0c7f5c3ca4 Update README.rst 2018-12-02 08:22:51 -08:00
e7e2ab1070 Make return type of basic_format_args::max_size() consistent.
This squashes nasty narrowing conversion warnings.
2018-12-01 17:07:21 -08:00
29352af369 Update README.rst 2018-12-01 08:19:20 -08:00
68214bd904 More time formatting 2018-11-30 20:12:01 -08:00
bcf3fcd673 Clean up bit fiddling for argument packing 2018-11-30 17:04:49 -08:00
9dcf127fa5 Workaround a bogus MSVC warning 2018-11-30 13:47:04 -08:00
b8b06e3e10 Fix conversion warnings in Grisu 2018-11-30 10:37:40 -08:00
322b2594e0 Implement more time specifiers 2018-11-30 09:25:18 -08:00
0835f1ba3b Use full paths for fmt.pc.in 2018-11-30 06:17:33 -08:00
a084495d7e Add Ceph to projects 2018-11-28 17:28:27 -08:00
fa1d4dbcfd Fix warnings 2018-11-28 16:15:15 -08:00
2b2cfdac19 Update docs 2018-11-28 12:53:09 -08:00
99744f8f8f Suppress unfixable warning 2018-11-28 12:52:41 -08:00
f5fe849238 Specialize formatter for chrono durations 2018-11-28 11:39:21 -08:00
a5a9805a91 First stub at the datetime format parser 2018-11-25 17:25:22 -08:00
645c76a9a5 Fix dummy warnings 2018-11-25 15:33:28 -08:00
fecb2d6f0d Eliminate msvc compiler warnings (#931)
The sheer presence of 'std::gmtime' or 'std::localtime' gives rise to C4996 warnings in Microsofts compilers. Alas, the 'fallback(internal::null<>)'functions containing these library calls are never ADL-picked in the respective 'handle(internal::null<>)' selectors. Therefore hiding the fallbacks from msvc is perfectly fine.
2018-11-25 13:48:52 -08:00
64690d3a97 Add context_base::arg() 2018-11-24 10:49:48 -08:00
01640f44cf Fully qualify dummy_int (#941) 2018-11-24 06:22:59 -08:00
e37d6a9840 add make_printf_args and make_wprintf_args functions (#934)
* add make_printf_args and make_wprintf_args to printf.h
add minimal test for make_printf_args and make_wprintf_args to printf-test.cc

renamed the old printf_context template to basic_printf_context_t. the original wish was to rename it basic_printf_context, but that clashed with the name of the inner typedef. this style matches the format_context_t struct.
2018-11-22 13:57:07 -08:00
982ee5c699 parse_context -> format_parse_context 2018-11-21 07:10:22 -08:00
b7b8548559 thousands_sep -> thousands_sep_impl (#939) 2018-11-20 15:43:17 -08:00
00a8cc8325 Fix formatting 2018-11-20 07:43:40 -08:00
33fbb3a7eb Fix remaining linker errors. 2018-11-20 07:01:21 -08:00
bd6121596f Disable fmt-impl-test in windows + shared lib. 2018-11-20 07:01:21 -08:00
702b3d1618 Fix link error in windows with shared library. 2018-11-20 07:01:21 -08:00
9d4ef94350 Install pdb files. 2018-11-20 07:01:21 -08:00
6c95fb3562 Default Context to format_context 2018-11-18 07:19:25 -08:00
16b78ee629 fix incompatibilities with c++2a mode in clang 2018-11-17 08:38:04 -08:00
19e008876b More locale support 2018-11-14 16:25:49 -08:00
f2ee988105 Improve locale support 2018-11-14 12:07:39 -08:00
1385050e26 More formatter tests 2018-11-08 16:26:55 -08:00
03c1b110a5 Fix gcc 4.4 build 2018-11-08 12:41:55 -08:00
cc805c6162 Test enabled formatters 2018-11-08 10:59:10 -08:00
e01579231d Disallow leading zeros in arg-id 2018-11-08 08:48:56 -08:00
34030deca9 Cleanup warning flags 2018-11-06 17:22:30 -08:00
6b26e3f2d7 Manifest & Gradle comment
- #926
- The version of android build results follows latest release(5.2.1)
- Comment for Gradle and its plugin for android
 - `net.fmtlib` package name in the manifest
2018-11-05 17:31:09 -08:00
d286c97753 Update for Gradle build
Recovered Gradle build with latest release (ver. 4.10.2)

TravisCI
- Changed several apt configurations & build steps for Android

AndroidManifest:
- package name: fmt -> org.fmtlib

Gradle:
- Plugin version 3.1.3. Requires Gradle 4.4+
- Removed `x86` (duplicated with `x86_64`)
- `-std=c++17`. Latest NDK(clang7) should support this
- Missing `repositories` configuration

For some reason, the `repositories` config affects to the error:
"Could not find com.android.tools.lint:lint-gradle:26.1.3."
2018-11-05 17:31:09 -08:00
d951f6dfe7 Get latest Gradle (ver. 4.10.2)
Recovery of Gradle build. 1 of N
Modified several apt configurationss and order of the build
2018-11-05 17:31:09 -08:00
a23d592472 Fix check_format_string (#925) 2018-11-03 16:51:15 -07:00
36161284e2 Update docs 2018-10-28 09:28:51 -07:00
38f355d87b Revert "find sphinx-build before calling build.py"
This reverts commit 07200f445a because
the latter doesn't work with virtualenv correctly.
2018-10-28 09:26:21 -07:00
324eac1aa5 Make locales work with any character type 2018-10-28 09:03:27 -07:00
bdda4d6030 Simplify compile-time strings 2018-10-28 09:02:03 -07:00
5ee1a4bc8a check for property 'mutable iterator' and SFINAE on it 2018-10-28 08:57:43 -07:00
2dea780fbd change type naming and fix sfinae bug 2018-10-28 06:00:55 -07:00
b98e8301d5 add non-char support for compile-time format check 2018-10-28 06:00:55 -07:00
ccd3e8bbf3 Make is_constructible public (#918) 2018-10-27 17:10:19 -07:00
4373153800 Update usage.rst 2018-10-27 12:59:51 -07:00
73cfd8f325 Fix colored print 2018-10-25 17:18:46 -07:00
ec384302db additional test for print with background color
checks for clashes with other function overloads in fmt with templated parameters on the first or second position in the parameter list
2018-10-25 16:54:54 -07:00
0a96c032b9 Parameterize v*printf on string type (#920) 2018-10-25 13:52:08 -07:00
61e6d2e38c Fix core version of vformat_to 2018-10-25 06:21:41 -07:00
ea4010d704 Merge has_to_string_view into is_string 2018-10-24 18:16:00 -07:00
486fff597c Add sprintf_format instantiations and remove syntactic noise 2018-10-24 16:46:32 -07:00
1e3dcbba81 fix: 'format_to_n' compiles 'std::back_inserter' arguments
std::back_insert_iterators model the OutputIterator concept but differ considerably in their traits and behavior. In particular the former made compilation to fail when format_to_n is given a back_inserter as first argument. The emulation of an OutputIterator is not perfect due to the behavioural differences of back_insert_iterators (e.g. assignment always implies increment) but good enough to be used within fmt's machinery.
2018-10-24 16:45:18 -07:00
f0328f8e36 Use char_traits::length in string_view ctor (#914) 2018-10-24 15:21:21 -07:00
895fb98456 Disallow gcc 4.4 failures 2018-10-24 10:52:13 -07:00
20c708bf6d Fix build on gcc 4.4 2018-10-24 10:52:02 -07:00
9d0c9c4bb1 cmake: output share/fmt.pc 2018-10-24 07:14:08 -07:00
2d2326a76d Fix compilation with older gcc 2018-10-23 07:31:24 -07:00
1ec0272303 Get rid of FMT_UNION 2018-10-22 20:19:31 -07:00
2c81c851b2 Adapt any string-like type to be used by {fmt} just like the standard string types already supported. The adaption is totally non-intrusive.
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-10-22 18:25:52 -07:00
846c644e84 Workeround broken sprintf in MSVC 2018-10-19 07:30:59 -07:00
13d472bd8c Compute output size for grisu 2018-10-18 17:16:50 -07:00
b71d3fe7ab Remove use_grisu 2018-10-17 17:01:45 -07:00
847abb6f8f Fix test 2018-10-17 11:57:06 -07:00
dda47c9466 Merge min_digits and max_digits 2018-10-17 10:49:30 -07:00
2924622157 Fix naming of basic_format_specs members 2018-10-17 10:13:10 -07:00
bda5f9a556 Replace grisu2_specs with core_format_specs 2018-10-17 08:55:45 -07:00
b1ca608bac Remove unused empty_spec 2018-10-17 08:39:58 -07:00
e8efdef8de Avoid extra copy 2018-10-17 08:19:46 -07:00
98f1c1fe87 Remove unused code 2018-10-14 15:36:45 -07:00
50b18a3c10 Integrate Grisu 2018-10-14 14:33:25 -07:00
699297520a Implement Grisu rounding 2018-10-13 11:18:54 -07:00
4bb76ef0c7 Remove redundant definition of print 2018-10-13 11:15:46 -07:00
ddd7caf38e Fix locale-dependent formatting (#905) 2018-10-13 11:15:41 -07:00
10e03e695b use found python executable for launching sphinx-build
there is chance that the distro install python as python3, in that case
the shebang of
```
```
in build.py won't work.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2018-10-13 09:14:53 -07:00
07200f445a find sphinx-build before calling build.py
this allows us to use sphinx-build-3, as user might already in a python3
world, and distros, like fedora 28, tend to add a "-3" suffix to sphinx-build.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2018-10-13 09:14:53 -07:00
08a65c2282 Workaround broken constexpr in MSVC2017 2018-10-11 06:38:25 -07:00
167f8fe325 Fix a typo in api.rst 2018-10-10 10:51:43 -07:00
57983423c3 Remove signbit workaround 2018-10-10 09:41:46 -07:00
7bebb3e128 Clarify overload resolution in docs 2018-10-10 09:41:46 -07:00
939fbe5567 Remove basic_fixed_buffer.
Issue #873 indicates that this class is no longer required,
as it has been superseded by a new API.

Fixes #873
2018-10-09 06:51:01 -07:00
61f81a0719 minor documentation corrections
In the Format API section, it says fmt:print writes to a file, but it
writes to a stream as referenced from fopen(3), "stream open
functions". Also in the Safety section a typo; tim should be time.
2018-10-08 06:27:25 -07:00
f27defc639 Parameterize printf functions on the type of the format string.
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-10-08 06:22:04 -07:00
6a685571df Make 'std::*::basic_string_view' a valid argument type for 'format_str' parameters.
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-10-08 06:12:02 -07:00
87a0408c64 Fix ostream.h build 2018-10-07 12:58:20 -07:00
2b5acad4a9 Remove redundant size argument to write_padded 2018-10-07 12:45:34 -07:00
655ce53383 is_format_string -> is_string 2018-10-07 12:45:22 -07:00
fea712abb1 Parameterize ostream functions on the type of the format string.
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-10-07 09:21:14 -07:00
f16a118e88 Fix non-matching char types.
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-10-07 05:56:21 -07:00
041bf83d9b Improve fmt::format readability 2018-10-05 18:42:02 -07:00
2299032392 Document how to write a formatter for a type hierarchy 2018-10-05 13:21:29 -07:00
f5480635c0 visit -> visit_format_arg 2018-10-05 07:15:41 -07:00
cdf3fa08dc Put related code together in fmt/core.h 2018-10-04 19:44:09 -07:00
38325248e5 Count width in code points (#628) 2018-10-03 20:09:46 -07:00
deb901b9e4 Parameterize core functions on the type of the format string.
Take #2 of n

Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-10-03 14:19:08 -07:00
0f98de3011 Update docs 2018-10-03 12:07:55 -07:00
c797708fcc Workaround strlen being non-constexpr in ARM toolchain 2018-10-03 09:23:49 -07:00
49b4c1e9db Update docs 2018-10-02 06:21:19 -07:00
63a87beba4 Add to_string_view 2018-10-01 18:48:18 -07:00
4e0c314654 checked_format_args -> checked_args 2018-10-01 07:14:59 -07:00
c3538a1eee Simplify variadic functions further 2018-09-30 22:19:32 -07:00
2d7d0835d7 Simplify variadic functions 2018-09-30 21:52:47 -07:00
3f4cfa6c60 Implement UTF-8 string support 2018-09-30 15:45:58 -07:00
f8027414f5 Impelement char8_t support 2018-09-30 12:31:25 -07:00
76a47d41c8 Cleanup the use of FMT_CHAR 2018-09-30 08:45:57 -07:00
267fdc7a1b Parameterize core functions on the type of the format string.
Take #1 of n

Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-09-30 08:40:58 -07:00
5bced12421 Parameterize more functions on string type 2018-09-30 08:02:19 -07:00
674999c527 fix vs2017 warning fmt::v5::localtime 'not all control paths return a value'. 2018-09-30 07:23:35 -07:00
e4fea22d15 Make char8_t a strongly-typed enum 2018-09-30 07:11:37 -07:00
66992e90d2 Clarify that writing to memory_buffer appends (#877) 2018-09-28 06:22:12 -07:00
e864acfdbd Fix compilation with intel compilers (ICC/ICPC) v14.0 2018-09-27 07:11:23 -07:00
4cf21f58b2 constrain templated format_to on proper format string type.
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-09-26 21:05:47 -07:00
d7f17613f5 Fix compilation on platforms with exotic double (#878) 2018-09-26 08:45:34 -07:00
e4ca37ccf6 Parameterize format_to on string type (#880) 2018-09-25 07:47:15 -07:00
d66fa2216e Reduce syntactic noise 2018-09-23 14:31:14 -07:00
48e6dcd0f2 Implement workarounds for gcc 4.4 2018-09-23 12:29:48 -07:00
0ea3221d34 Remove is_named_arg and add FMT_CHAR 2018-09-23 09:44:01 -07:00
73c53d7833 Parameterize 'printf(rgb color, ...)' and 'vprint_rgb(rgb color, ...)' on the type of the format string.
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-09-23 09:15:27 -07:00
d41be23acd Simplify string_view detection 2018-09-23 07:29:35 -07:00
2def9e4c82 Remove FMT_DTOR_NOEXCEPT 2018-09-22 18:51:32 -07:00
ff6e46ed97 More cleanup 2018-09-22 16:00:34 -07:00
715f2b4c00 Remove require_wchar and internalize no_formatter_error 2018-09-21 18:25:24 -07:00
ec0cdc46f6 Workaround Windows slowness 2018-09-21 17:11:57 -07:00
3e75ad9822 Update version 2018-09-21 10:18:51 -07:00
4f043f8e00 Bump version 2018-09-21 10:07:56 -07:00
cc02cbc455 Fix formatting 2018-09-21 09:48:21 -07:00
73c0238e3b Update changelog 2018-09-21 09:48:21 -07:00
cb122a4d03 Fix format_to formatting to wmemory_buffer 2018-09-21 09:48:21 -07:00
dc69cc45d2 Clean tests 2018-09-21 09:48:21 -07:00
9d8021f0d6 Add checks for NVIDIA's CUDA compiler
- Disable templated user-defined literals when compiled under nvcc

Similarly to Intel's C++ compiler, nvcc fails to compile templated UDLs
as they both share the same parsing engine (EDG C++ Front End).  This
fixes building CUDA programs which make use of fmt.
2018-09-21 06:55:45 -07:00
9d2221b954 Improve error message when formatting unknown types 2018-09-20 07:01:39 -07:00
70a6a4bb01 prevent ""fmt/range.h"" from specializing fmt::basic_string_view (#865) 2018-09-19 20:13:05 -07:00
e4fc856c2f Disable android build due to gradle issues 2018-09-19 19:53:47 -07:00
3f4984fb36 Clean core-test and fix linkage errors on older gcc 2018-09-19 12:24:38 -07:00
d43665056d Workaround visit lookup issues in printf.h on gcc 2018-09-19 09:16:26 -07:00
894b6fac8e Changed to use scoped enum
Changed "reusing existing formatters example" to use scoped enum instead.
2018-09-16 17:28:40 -07:00
59f555ad8f Workaround more visit lookup issues on gcc 2018-09-15 08:46:12 -07:00
a7e356cc80 Update README.rst 2018-09-14 07:52:30 -07:00
e758bfbae1 Merge branch 'release' of github.com:fmtlib/fmt 2018-09-13 07:38:23 -07:00
66381e308d Minor cleanup 2018-09-13 07:37:50 -07:00
295a0d84d9 Update version 2018-09-13 07:28:20 -07:00
1fb1c4c912 Update docs 2018-09-13 07:20:43 -07:00
465a593536 Add table support to rst2md 2018-09-13 07:15:18 -07:00
d62f4c3bc1 Formatting 2018-09-12 19:00:26 -07:00
a243490ad7 Add more methods to benchmark results 2018-09-12 18:28:26 -07:00
9e12ca6069 Update changelog 2018-09-12 18:07:29 -07:00
fbca830dd1 Update changelog, readme and improve compat 2018-09-12 12:44:04 -07:00
6146248cf4 Update changelog 2018-09-12 10:42:50 -07:00
bc26fbf1b0 Move experimental color API to fmt/color.h 2018-09-12 09:04:26 -07:00
97cc889374 Workaround a visit lookup issue in gcc 8 (#851) 2018-09-12 08:45:14 -07:00
7110b46076 Optimize default formatting 2018-09-12 08:45:14 -07:00
c8a8464f7d Optimize buffer construction 2018-09-12 08:45:14 -07:00
8cbfb6e727 Get rid of conversion warning in gcc-4.8 (#854)
Get rid of conversion warning in gcc-4.8 

Get rid of the following warning:
conversion to ‘int’ from ‘long unsigned int’ may alter its value [-Werror=conversion]
2018-09-11 06:14:39 -07:00
6ffc828a79 Phasing out null_terminating_iterator 2018-09-10 06:51:38 -07:00
aeb6add336 Skip strchr for the common case 2018-09-09 09:08:41 -07:00
5614289dd8 Optimize and simplify format string parsing 2018-09-09 08:41:27 -07:00
10c7f89351 Optimize format string processing on dumb compilers 2018-09-09 08:13:06 -07:00
59c268a5f8 Use strlen when possible since it's constexpr on gcc 2018-09-08 16:17:22 -07:00
918bb1ce8f Optimize argument capture 2018-09-08 15:29:32 -07:00
a3ba6b4f62 Disable the fmt(...) macro by default (#853) 2018-09-08 09:55:41 -07:00
8671689449 Update docs and formatting 2018-09-08 09:06:54 -07:00
cc10b4607f Make format_to faster on older gcc 2018-09-08 07:22:29 -07:00
981797f059 Get rid of implicit-fallthrough warn. in GCC 7 and 8
This change enables FMT_FALLLTHROUGH also for GCC-Compilers in the versions 7 and 8.
2018-09-07 12:43:32 -07:00
2117775747 Micro-optimize parsing 2018-09-05 07:10:50 -07:00
be0e268468 Optimize processing of trailing '}' 2018-08-31 15:34:31 -07:00
fbc38b9083 Pass heavy arguments by ref 2018-08-31 15:17:18 -07:00
8dc69b9da9 Workaround a bug in Intellisense 2018-08-29 20:40:54 -07:00
1489d3b7fa Implement exponential notation 2018-08-29 18:55:57 -07:00
dd8c5ce442 Implement more FP formatting options 2018-08-29 09:34:57 -07:00
46484da711 Fix a warning 2018-08-29 07:00:24 -07:00
802ff8866e Fix compilation of time.h when localtime_t is a macro (#843) 2018-08-29 06:40:54 -07:00
95a718992c Remove conversion compiler warnings (#844)
* Remove conversion compiler warning

When compiling with g++8, I get the following two errors:
include/fmt/format-inl.h:400:29: error: conversion from ‘int’ to ‘char’ may change value [-Werror=conversion]
       buffer[size++] = zero + static_cast<char>(digit);
                        ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
include/fmt/format-inl.h:416:28: error: conversion from ‘int’ to ‘char’ may change value [-Werror=conversion]
       buffer[size++] = '0' + digit;
                        ~~~~^~~~~~~

With this change, the errors are gone.
2018-08-29 06:38:56 -07:00
e483a01a0f Implement some formatting options in Grisu 2018-08-27 17:51:49 -07:00
f51080916e Revert "Implement some formatting options in Grisu"
This reverts commit 2a952dd0b2.
2018-08-27 17:51:27 -07:00
2a952dd0b2 Implement some formatting options in Grisu 2018-08-26 09:51:49 -07:00
0de44a469a Implement exponent formatting 2018-08-26 08:12:35 -07:00
f0d0a1ebd7 Implement Grisu2 digit generation 2018-08-25 20:45:50 -07:00
569ac91e0b Implement Grisu boundary computation 2018-08-25 11:39:38 -07:00
a11eb3a090 Workaround various icc bugs (#822) 2018-08-22 09:07:17 -07:00
62010520ed Disable gnu-string-literal-operator-template warning 2018-08-22 08:12:59 -07:00
987514761e Make convert_to_int public (#818) 2018-08-22 07:40:06 -07:00
ba95e36a58 Clarify that '\0' cannot be used as fill (#832) 2018-08-19 08:37:40 -07:00
abde38b4fb Add compilation support with Newlib nano for embedded targets
Remove the dependency on std::locale to reduce executable sizes

For embedded target the usage of locale bring a huge amount of code to the executable, just to get hold of the thousands separator. Using a static defined thousands separator makes libfmt embedded target friendly.
2018-08-19 07:40:34 -07:00
18400503da Fix C4127 warning in basic_writer<Range>::write_double 2018-08-17 07:36:38 -07:00
9de312112a Reformat and add a comment 2018-08-15 06:54:43 -07:00
8bbb0b48b4 Update README.rst 2018-08-15 06:34:34 -07:00
5c0101ab2d Use the correct function signature in the docs 2018-08-12 11:34:48 -07:00
fbe6410e53 Fix docs 2018-08-12 08:52:47 -07:00
8b9fb9fb7e Fix ambiguous instantiation with formatter in fmt/ostream.h (#830) 2018-08-11 09:13:54 -07:00
0f04ec68a9 Fix package upload (#828) 2018-08-11 07:57:45 -07:00
809073851f Update changelog 2018-08-11 07:22:41 -07:00
5d02041c59 Update changelog 2018-08-11 07:12:52 -07:00
4b868b8922 Re-enable compile-time format-string checking
Since the commit 691a7a9 compile-time string checking was accidently not possible anymore.
With this change, it should be possible again.
2018-08-07 07:43:47 -07:00
4061a0d35d Parameterize vformat to support custom char types 2018-08-05 10:44:59 -07:00
c68bab7014 Remove broken fmt::internal::format_enum (#818) 2018-08-01 07:11:53 -07:00
0c63d15ee9 Improve wording 2018-07-27 07:37:45 -07:00
ce19309d09 Workaround a bug in icc 15 2018-07-26 07:59:41 -07:00
c684349195 Move contiguous version of format_to to fmt/core.h 2018-07-22 18:09:22 -07:00
8db14efa84 util-test -> core-test and minor cleanup 2018-07-22 17:05:23 -07:00
ffe414cad1 Add compile-time format string checks to format_to (#783) 2018-07-22 15:30:51 -07:00
c178ab440f Remove FMT_USE_RVALUE_REFERENCES 2018-07-22 15:07:53 -07:00
5befe6584d Remove fmt/folly.h and clean up core API 2018-07-22 14:42:25 -07:00
35538ca66c Merge more format overloads 2018-07-22 12:24:47 -07:00
4f16409730 Merge format overloads using SFINAE 2018-07-22 08:06:42 -07:00
2a4e948864 Add UTF-8 types 2018-07-22 06:36:21 -07:00
d778bded95 Make line in tests fit within 80chars 2018-07-20 17:07:23 -07:00
7b4f170c94 Fix warning about using old-style cast 2018-07-20 17:07:23 -07:00
b1d10a2884 Add support for dynamic arg sets
This allows construction of basic_format_args from a dynamic set of arguments. The syntax is a little clunky and could probably be improved but this at least enables the functionality.
2018-07-20 17:07:23 -07:00
cf2719bd12 Add support for types explicitly convertible to wstring_view 2018-07-18 19:12:10 -07:00
50584f42b4 Test formatting of an object with templated conversion to string-like 2018-07-18 16:24:46 -07:00
73bed45b7a Add support for types explicitly convertible to fmt::string_view 2018-07-18 14:42:26 -07:00
6eaa507473 Fix global initialization issue (#807) 2018-07-18 09:49:21 -07:00
48dff9f3c5 Update docs 2018-07-18 06:44:46 -07:00
a9e261599b Minor cleanup 2018-07-17 08:54:22 -07:00
efd8ee8a7f Reduce warnings, support #809 2018-07-16 12:37:54 +02:00
8615ff2acc Micro-optimize argument retrieval 2018-07-15 07:28:31 -07:00
916ed99dab Micro-optimize argument retrieval 2018-07-14 15:28:55 -07:00
e7e9578ed4 Optimize format string parsing 2018-07-14 14:27:56 -07:00
c99a259739 Mark new functions with FMT_API (#808) 2018-07-14 07:43:16 -07:00
e0f6a2f8be Add a formatter for folly::StringPiece 2018-07-14 07:31:47 -07:00
ae4a3945f5 Revert "Better support for newer CMake's"
This reverts commit 0eb01b832c.
2018-07-14 06:34:20 -07:00
a317448bd4 Keep noexcept specifier when exceptions are disabled. 2018-07-13 12:46:15 -07:00
0eb01b832c Better support for newer CMake's 2018-07-11 07:08:17 -07:00
2a4cd6d05e Fix the returned value of format_to_n with user-defined types having operator<<. 2018-07-10 14:01:12 -07:00
9c32e73abf Fixing return unreachable warning on NVCC 2018-07-09 21:33:10 -07:00
e5c93108e6 Added clear() to basic_buffer 2018-07-09 20:25:49 -07:00
60c662b3a7 Add an example of reusing formatters 2018-07-08 15:00:44 -07:00
f66ba6508a Optimize format string parsing 2018-07-08 10:15:24 -07:00
f21268aa72 Revert "Optimize format string parsing" because of a bug in MSVC
https://godbolt.org/g/rpiDgh

This reverts commit f9e9bf0231.
2018-07-08 08:08:50 -07:00
07b690a679 Update README.rst 2018-07-07 18:18:56 -07:00
f9e9bf0231 Optimize format string parsing 2018-07-07 16:50:22 -07:00
c2ce7e4f07 Update version 2018-07-05 06:22:54 -07:00
434eb9167e Update README.rst 2018-07-04 18:07:17 -07:00
09d94162f9 Update changelog 2018-07-04 17:47:46 -07:00
e6362642cf Fix pedantic conversion warning 2018-07-04 17:45:28 -07:00
f0110e8125 Update changelog and CI 2018-07-04 17:43:07 -07:00
479ee2a8c6 Fix MSVC build, take 2 2018-07-04 14:24:07 -07:00
e928b6724c Fix MSVC 2013 build 2018-07-04 12:33:15 -07:00
ec218a3ad1 Fix redefinition warning for RESET_COLOR 2018-07-04 07:52:19 -07:00
c04fb91b03 Fix handling of user-defined types in format_to (#793) 2018-07-04 07:40:56 -07:00
323b92bffe Force linking of inline functions into the library (#795) 2018-07-03 19:10:23 -07:00
c6d9730ddb Fix sign conversion warnings (#790) 2018-06-27 14:31:20 +02:00
2e95823ef7 Move new color support to format.h and mark old as deprecated 2018-06-24 06:39:22 -07:00
ab2d88ca8e Make format_to work with basic_memory_buffer (#776) 2018-06-23 08:29:26 -07:00
3abd036c47 Fix compilation on gcc 4 2018-06-23 07:18:59 -07:00
c2f3805488 Add vformat_to_n (#769) 2018-06-23 07:03:00 -07:00
ce500635c7 Renamed enum color to colors.
Added enum colors conversion to rgb struct.
Added colors_test.cpp.

Removed print_colored.
Renamed enum colors back to color.

Removed unnecessary inline keyword.
Removed print_rgb.
2018-06-23 06:14:44 -07:00
0508bbc7ae Add wchar_t overload of format_to_n (#764) 2018-06-13 08:24:32 +02:00
c2fbadb9cf Fixed issue #779 2018-06-12 07:39:44 +02:00
47268ecd80 Fixed GCC version test 2018-06-10 20:35:38 +02:00
9ff3b6af2e Fix handling of compile-time strings when including ostream.h (#768) 2018-06-10 19:05:27 +02:00
e3707ef14b Document that file should be in wide-oriented mode for wide print 2018-06-09 09:12:49 +02:00
45fa4ee949 Merge branch 'master' of github.com:fmtlib/fmt 2018-06-08 21:43:56 +02:00
9c07b37fff Using enum class now.
Renamed from hex to color.
Changed colr names to snake case.
2018-06-08 21:40:35 +02:00
5b5886a993 Fixed line length. 2018-06-08 19:48:41 +02:00
d2bfee13e2 Added quotes for strings in ranges and tuple likes. 2018-06-08 19:48:41 +02:00
aff6e45e14 Added support for rgb color output. 2018-06-07 22:49:16 +02:00
1b8a7f8fa0 Fix postincrement in truncating and counting iterators 2018-06-07 20:20:36 +02:00
4bc26f0a7b Merge branch 'master' of github.com:fmtlib/fmt 2018-06-07 18:42:30 +02:00
fc6e0fe992 Fix FP formatting to a non-back_insert_iterator with sign & numeric alignment (#756) 2018-06-07 18:41:40 +02:00
cd5b5670ba Make is_range and is_tuple_like public API, fix #751 2018-06-06 21:49:14 +02:00
6322b47e60 Minor cleanup 2018-06-06 16:51:35 +02:00
691a7a91a1 Add more compilers to CI and increase FMT_PEDANTIC warning levels (#736)
* Add a _lot_ more warnings to FMT_PEDANTIC
Fix these warnings

* Add more compilers to CI
Fix (some) of the compiler errors with them

* Enable -Werror on CI
Increase warning level on MSVC when compiling with FMT_PEDANTIC

* Add VS 2013 and 2015 to Appveyor

* Fix Appveyor tests
Formatting

* Implement requested changes
Fix some of the MSVC warnings
Implement C++11 integer_sequence

* Reintroduce appveyor-build.py

* Remove ranges-test from tests

* Remove (some) explicit warning suppressions
Fix C++ standard setting in CI

* Remove (some) explicit warning suppressions
Fix C++ standard setting in CI

* Fix test builds with C++11

* Enable pedantic warnings on tests

* Fix warnings from edits to master

* Cleanups

* Add C++11 support to ranges.h
Re-enable ranges-test
Fix a Visual Studio error about function not returning a value in printf.h
Fix a bug in .travis.yml
2018-06-06 15:57:59 +02:00
dd1a5ef7f9 Let requests close the file 2018-06-05 16:58:02 +02:00
d5c462596b Fix formatting of more than 15 named arguments (#754) 2018-06-05 08:32:28 +02:00
47d147b65d Simplify the nvcc warning fix 2018-06-04 21:27:20 +02:00
911a75114b Fix nvcc warnings (#752) 2018-06-04 21:00:28 +02:00
94b476283c Fix docs 2018-06-04 19:56:22 +02:00
252f11f85d Fix a bogus MSVC warning about unreachable code, take 2 2018-06-04 18:17:55 +02:00
81d5663825 Fix more bogus MSVC warnings about unreachable code (#748) 2018-06-04 06:10:52 +02:00
68f0ac8271 Fix a bogus MSVC warning about unreachable code 2018-06-03 08:03:56 +02:00
b60a5c5d49 Improve floating-point formatting 2018-05-28 20:16:30 -07:00
8dc2360b11 Fix a comment 2018-05-28 17:21:39 -07:00
4e4b8570e5 Implement simple version of Grisu 2018-05-28 11:25:07 -07:00
4027557958 Fix tests on 64-bit MSVC 2018-05-27 11:38:53 -07:00
5c32aa411c Workaround a bug in MSVC 2018-05-27 11:18:27 -07:00
468c243ca8 Add a function to get cached power of 10 2018-05-27 10:57:26 -07:00
2f257b7291 Implement normalization and simplify power table 2018-05-27 08:04:30 -07:00
6a5bb6e268 Move Android.mk to support and update 2018-05-27 06:20:54 -07:00
e282d963fe Bump version 2018-05-26 09:46:59 -07:00
e2cd521b8f Fix incorrect call to on_align in '{:}=' (#750) 2018-05-26 09:23:09 -07:00
fba352a92a Don't use UDL templates on Intel C++ compiler (#742) 2018-05-26 08:07:45 -07:00
6dcc526d5b Update release script 2018-05-26 07:02:49 -07:00
5386f1df20 Update version 2018-05-21 21:00:04 -07:00
ba6640b257 Fix formatting 2018-05-21 20:50:23 -07:00
507a50c3ad Fix changelog 2018-05-21 20:38:07 -07:00
147807c911 Detect integer_sequence support on MSVC 2018-05-21 20:30:58 -07:00
8b246531e6 Update changelog 2018-05-21 20:27:58 -07:00
5ad54256c5 Fix a conflict between fmt::join and fmt/ostream.h (#744) 2018-05-21 20:21:06 -07:00
6ebc1a967d Merge locale.h into format-inl.h 2018-05-20 17:16:34 -07:00
6966db1dab Update docs 2018-05-20 17:10:34 -07:00
2196025dd1 Fix a warning 2018-05-20 17:09:12 -07:00
589f5f37b6 Update changelog 2018-05-20 16:00:39 -07:00
edd5f1445d Fix compilation errors on gcc 4.4 2018-05-20 09:09:03 -07:00
936aba5f90 Fix compilation errors on gcc 4.4 2018-05-20 07:42:09 -07:00
3e3a27740e Update changelog 2018-05-19 11:46:55 -07:00
b76bb79613 Improve naming consistency 2018-05-19 10:32:53 -07:00
fbd5153487 Update changelog 2018-05-19 10:31:49 -07:00
69823bf852 Improve naming consistency 2018-05-19 08:59:37 -07:00
d940fa679c Disable unsafe implicit conversion to std::string (#729) 2018-05-19 07:14:27 -07:00
d2bf93fe22 Update changelog 2018-05-19 07:13:06 -07:00
550ef1d29d MSVC improvements and data truncation cleanup.
MSVC is timid about evaluating constexpr functions unless it has to, so the "TYPES" variables end up in read-write memory even though the optimizer removes the initializer. Making TYPES constexpr causes MSVC to try harder to initialize these variables at compile time, which also ends up completely removing the (named) variable from the final compiled binary.
Fixed a data truncation warning being reported in ostream-test.
2018-05-17 18:46:31 -07:00
728e4f5a8d Fix docs 2018-05-16 08:26:55 -07:00
8c2557710d Update docs and changelog 2018-05-16 07:58:53 -07:00
a68fd44ecc Add ranges.h to FMT_HEADERS in CMakeLists.txt (#738) 2018-05-14 06:16:30 -06:00
e3f7f3a2e9 Add support for ranges, containers and tuple-like types in fmt/ranges.h 2018-05-13 13:28:11 -07:00
984232db15 Remove duplicate ChangeLog entries 2018-05-13 13:14:28 -07:00
78677e3fcf Update ChangeLog and docs 2018-05-13 12:42:55 -07:00
ad23270ec7 Document to_wstring 2018-05-13 09:11:29 -07:00
3c0f8c2601 Update ChangeLog 2018-05-13 08:53:16 -07:00
989378930a Detect inline namespaces on gcc 2018-05-13 08:53:04 -07:00
dfb6546932 Fix docs 2018-05-13 08:04:39 -07:00
3aa2911579 Update ChangeLog.rst 2018-05-13 08:02:06 -07:00
d3f6c841c1 Update ChangeLog.rst 2018-05-13 07:22:41 -07:00
c1441ae4c4 Update ChangeLog.rst 2018-05-12 16:02:20 -07:00
dece85b31f Fix docs, take 2 2018-05-12 13:57:56 -07:00
6a1df3bd05 Fix docs 2018-05-12 12:57:16 -07:00
838400d29b Add inline namespace fmt::v5 2018-05-12 11:02:15 -07:00
b64b24ebc5 Update ChangeLog.rst 2018-05-12 09:42:59 -07:00
fc9087114f Update ChangeLog.rst 2018-05-12 09:10:11 -07:00
46c374a8a9 Fix compilation with new gcc and -std=c++11 (#734) 2018-05-09 20:58:05 -07:00
f0ae725721 Clarify the use of allocators 2018-05-09 06:43:54 -07:00
d72d046254 Update paths in fmt.pro 2018-05-09 06:21:00 -07:00
edbbf7ce6c Fix FreeBSD 12
FreeBSD 12 changed the type of freelocale to the type defined by
POSIX. Check the FreeBSD version when building for FreeBSD.
2018-05-09 06:10:37 -07:00
a4e4f74530 Fix a -Wundef when FMT_GCC_VERSION < 600 2018-05-09 06:09:25 -07:00
7d3de49715 Implement double to fp conversion 2018-05-06 13:37:49 -07:00
a4c7d99f70 Add bit_cast 2018-05-06 11:52:51 -07:00
0adccaefb6 Fix a -Wundef of _LIBCPP_VERSION 2018-05-05 07:43:22 -07:00
2570f1afdc Provide more overloads for the wide string flavour
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-05-05 07:31:44 -07:00
ca31ca13f1 Fixed arg_formatter_base::write_pointer to not mutate the format specs.
This fixes cases where arg_formatters are reused, like with arg_join.
2018-05-01 07:12:27 -07:00
6cd666100f remove trailing spaces.
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-05-01 07:10:05 -07:00
fe19c266ce Move format_string to fmt namespace for ADL 2018-04-29 08:35:20 -07:00
2768af2388 Add cached powers of 10 2018-04-29 06:33:05 -07:00
dd296e1de0 Add a script to compute powers of 10 2018-04-28 14:32:05 -07:00
0efc8a1808 Fix compiler warning about narrowing
Signed-off-by: Daniela Engert <dani@ngrt.de>
2018-04-27 06:41:43 -07:00
df1ba52b64 Update example 2018-04-22 17:04:28 -07:00
221b08fd8f Merge branch 'master' of github.com:fmtlib/fmt 2018-04-22 09:16:34 -07:00
fa9066fe3e context_base::begin -> out 2018-04-22 09:16:32 -07:00
90ff31b38e Fix a -Wundef warning on clang
Resolves #715
2018-04-22 09:13:55 -07:00
b1f68c43b5 Merge branch 'master' of github.com:fmtlib/fmt 2018-04-21 19:21:41 -07:00
cd90097ca4 Implement handmade FP 2018-04-21 17:26:24 -07:00
822eccc3b8 Sync API with standards proposal 2018-04-21 14:29:24 -07:00
2ae41242a5 allow time formatting with wchar_t contexts
change total specialization of 'struct formatter<std::tm>' into partial specialization 'template <typename Char> struct formatter<std::tm, Char>', backed by matching 'strftime'-like overloads
2018-04-18 18:55:49 -07:00
a1579b0ff8 Update key 2018-04-16 18:22:03 -07:00
ded921f0a2 Fix documentation build, take 2 2018-04-15 10:34:04 -07:00
3284751f43 Fix documentation build 2018-04-15 09:49:37 -07:00
bb738c4c26 Remove section on Write API since it's being superceeded by compile-time Format API 2018-04-15 09:13:44 -07:00
d180c25c8f Update godbolt link 2018-04-15 06:19:38 -07:00
1ed842a3b4 Update godbolt link 2018-04-14 12:41:08 -07:00
e80aba1c2b Remove format_float stub 2018-04-14 12:40:53 -07:00
7b8cb3135a Make context_base::args() public 2018-04-14 12:40:26 -07:00
48ae0506de fixes MSVC compiler warning bloat (Visual Studio 2017, latest updates) 2018-04-11 06:53:27 -07:00
096c4051b2 Simplify char_traits 2018-04-08 13:38:12 -07:00
7610c5362a Remove unused macro 2018-04-08 11:54:22 -07:00
111fa5814b Update README.rst 2018-04-08 09:03:37 -07:00
52fcef1e57 Update docs 2018-04-08 07:33:07 -07:00
7d28674d3a make_args -> make_format_args 2018-04-08 07:21:26 -07:00
9382b76f2a context_t -> format_context_t 2018-04-08 07:09:34 -07:00
fd0b07a75a (w)context -> (w)format_context 2018-04-08 07:03:44 -07:00
26aa34f319 basic_context -> basic_format_context 2018-04-08 06:45:21 -07:00
44cc034651 Relax string_view requirements 2018-04-07 16:18:01 -07:00
0829cab8f2 Remove from_checked 2018-04-07 15:21:48 -07:00
cb7bbc6224 Improve checked iterator support 2018-04-07 15:11:34 -07:00
5079f924d6 Fix a narrowing warning 2018-04-07 14:42:09 -07:00
5859e58ba1 Fix msvc warnings 2018-04-04 21:11:31 -07:00
1e747f603f Fix msvc warnings 2018-04-04 20:57:02 -07:00
9d4efd7aa2 Iterator Wars VI: Return of the checked iterator 2018-04-04 20:15:02 -07:00
9764f55891 Update docs 2018-04-04 07:53:19 -07:00
4ef97b9bb2 Add a missing comma 2018-04-04 07:43:51 -07:00
23759b2688 basic_arg -> basic_format_arg, arg_store -> format_arg_store 2018-04-04 07:38:21 -07:00
4975297eb0 Simplify counting iterators 2018-03-31 07:47:30 -10:00
e8e006f4e7 Fix compile checks for mixing narrow and wide strings (#690) 2018-03-30 09:29:47 -10:00
c5ebecf7c6 Document format_to_n 2018-03-30 08:31:41 -10:00
3cf0526316 Return output iterator to the end from format_to_n 2018-03-30 08:20:12 -10:00
174087bfdb Implement format_to_n 2018-03-29 15:13:10 -10:00
050f3f1f0e Remove parts of obsolete write API 2018-03-29 07:36:37 -10:00
e90b1da367 Fix linker errors using fmt as shared library in MSVC 2018-03-28 07:14:56 -10:00
8e10d404db Fix compile tests 2018-03-27 07:39:03 -10:00
7a41d61d79 Add make_printf_args
Fixes #687
2018-03-27 07:15:51 -10:00
4fea018b2d Fix string_view detection 2018-03-26 07:00:41 -10:00
6957d28cfb Detect string_view on libc++ (#686) 2018-03-26 06:50:22 -10:00
0ea70defbe Update readme 2018-03-21 09:25:28 -07:00
9ce5e30c06 Update readme 2018-03-21 09:15:28 -07:00
8c29459eda Fix handling of empty string_view (#689) 2018-03-21 09:01:51 -07:00
a24005d5fd Fix a narrowing warning 2018-03-21 08:29:06 -07:00
3651b7fca6 Fix a narrowing warning 2018-03-21 07:59:42 -07:00
b64486dae9 Add format.cc 2018-03-21 07:51:56 -07:00
3da71d51e0 Move source files to the src directory 2018-03-21 07:50:59 -07:00
7971ed3db3 Update readme 2018-03-21 06:48:36 -07:00
f61ca2ec4f Update readme 2018-03-21 06:46:41 -07:00
84e520b79c Update readme 2018-03-21 06:16:13 -07:00
e8aa0f3315 Update docs 2018-03-21 06:12:10 -07:00
17258e9c63 Update docs 2018-03-19 19:47:14 -07:00
6d339e32a0 Improve comment 2018-03-16 16:26:31 -04:00
c3d05245fe Fix a shadowing warning 2018-03-16 16:26:11 -04:00
b58c8ddeb4 Update docs 2018-03-16 16:04:12 -04:00
505b3ae66f Workaround GCC bug 67371 (#682) 2018-03-16 12:02:19 -04:00
70dffc639a Remove unnecessary check 2018-03-15 09:58:26 -04:00
df828f88da Don't define FMT_GCC_VERSION on clang 2018-03-15 09:55:31 -04:00
42f70c8b4f Avoid narrowing casts 2018-03-15 09:45:31 -04:00
10b939b096 Remove unneeded usage of anonymous struct on clang 2018-03-15 09:28:50 -04:00
3adfaae20c Remove extra semicolon in format_args constructor 2018-03-15 09:28:50 -04:00
4006678577 Fix warnings under MSVC (#679)
Closes #678.
2018-03-14 20:17:15 +01:00
9c5f54a723 Add format example for padded hex byte
Fixes #2
2018-03-13 23:05:48 -04:00
7bab90e52d Remove extra comma 2018-03-13 22:45:14 -04:00
2e21e7d1f1 Fix util-test 2018-03-13 22:20:06 -04:00
acb469ae2e Fixed UTF8/16 converters to support empty string input
Previously an exception was thrown since Win32 WideCharToMultiByte API
returns error on zero-length input.
2018-03-13 21:33:21 -04:00
c37c4c437e Fix find-package-test 2018-03-13 14:13:39 -04:00
6d21fc43b9 add alias targets with fmt namespace
For the consumer it should not matter if fmt has been added to the
project as subdirectory or via find_package. With the alias targets
the library can be always imported via fmt::fmt.
2018-03-13 13:51:48 -04:00
e02aacc634 Add CMake namespace (#511) 2018-03-13 13:03:18 -04:00
aee4512cc5 Gradle (#649)
* Gradle

Gradle support to make ease of import in Android Java projects.

* Gradle

Gradle support for Android projects.
For command line build, `gradle assembe` will trigger build phase

 - Config for Android .so file generation
 - Commented build.gradle
 - Automatic file copy after build
 - Dummy AndroidManifest file

* Build with Gradle

 - Build job for Travis CI
 - Moved gradle file to support/

* Gradle Path

 - Absolute path for Gradle binary

* File check after Gradle build

 - Additional script for build success
 - Check the Gradle's `assemble.doLast` task
2018-03-12 15:40:25 -04:00
7db0e94b9e Fix handling of numeric alignment with no width (#675) 2018-03-11 21:04:42 -04:00
9facc119a6 Update docs 2018-03-10 09:44:37 -08:00
a1d187113b Merge branch 'master' of github.com:fmtlib/fmt 2018-03-10 06:46:51 -08:00
daf650c49a Disallow formatting of multibyte strings into a wide buffer (#606) 2018-03-10 06:46:41 -08:00
8fd7e30f37 Update README.rst 2018-03-09 15:44:46 -08:00
ca93be130a Use fmt(s) as an alias for FMT_STRING(s) 2018-03-09 15:40:40 -08:00
80e57c7a3d Update to new naming conventions 2018-03-07 07:36:13 -08:00
ae3cc844e7 Check format string at compile time in print 2018-03-07 05:41:45 -08:00
585512fc7c Remove unnecessary instantiations 2018-03-04 15:14:02 -08:00
7755cdc199 Make symbols readable 2018-03-04 15:00:22 -08:00
f867d08239 Update docs 2018-03-04 12:09:34 -08:00
a103b9bc46 Workaround missed optimization in gcc (#668) 2018-03-04 11:45:20 -08:00
bb47109a78 Cleanup 2018-03-04 11:25:40 -08:00
f1ede6380b Make inline_buffer_size public and update docs 2018-03-04 10:33:42 -08:00
995b63adfe Update copyright 2018-03-04 10:11:44 -08:00
4023291759 Update docs 2018-03-04 09:55:17 -08:00
86a9bc8291 Cleanup 2018-03-04 09:16:51 -08:00
b7632e9641 Make format_to return iterator and update docs 2018-03-04 08:13:08 -08:00
5281ea6ad2 do_vformat_to -> vformat_to and update docs 2018-03-04 06:40:43 -08:00
d07ba49821 Fix docs 2018-03-03 22:12:23 -08:00
418659adbe Fix compilation errors on gcc 4.4 2018-03-03 14:04:59 -08:00
1d2adef28d Fix compilation errors on gcc 4.4 2018-03-01 03:45:25 -08:00
45518c3fe1 Fix compilation errors on gcc 4.4 2018-02-28 07:47:24 -08:00
698d909706 Workaround a bug in gcc 5.1 2018-02-28 06:14:56 -08:00
81074c7048 Fix more compilation errors on gcc 4.6 2018-02-28 05:23:25 -08:00
1b4525384b Fix more compilation errors on gcc 4.6 2018-02-28 05:09:24 -08:00
6090e51b65 Fix compilation errors on gcc 4.6 2018-02-28 04:49:20 -08:00
0827ec5aa9 Fix compilation errors on gcc 4.6 2018-02-28 04:33:43 -08:00
4d35f94133 Always use fallback string_view to pass format string (#664) 2018-02-24 18:19:30 +00:00
34cf54c2fc Update README.rst 2018-02-24 09:37:17 +00:00
0565d65461 Fix gcc 7.2 issue 2018-02-24 09:29:15 +00:00
f5dc0ed342 Break long lines 2018-02-24 08:39:17 +00:00
ea06f021f8 test: comment out one FormatStringErrors constexpr test
GCC 7.3 complains that this is not a compile time constant.

test/format-test.cc: In member function ‘virtual void FormatTest_FormatStringErrors_Test::TestBody()’:
test/format-test.cc:1919:3: error: non-constant condition for static assertion
   static_assert(test_error<__VA_ARGS__>(fmt, error), "")
   ^
test/format-test.cc:1924:3: note: in expansion of macro ‘EXPECT_ERROR’
   EXPECT_ERROR("{0:s", "unknown format specifier", Date);
   ^~~~~~~~~~~~
2018-02-24 08:20:20 +00:00
5b49177352 test: Initialize some local variables
GCC 7.3 complains about uninitialized varaibles in constexpr context.
2018-02-24 08:20:20 +00:00
f45f70af09 Use trailing return type instead of deduction
C++11 does not support deduction of return type.
2018-02-24 08:20:20 +00:00
db86e8d5d3 Remove a couple of unused argument names 2018-02-24 08:20:20 +00:00
55f5c9f21b Use FMT_NULL instead of 0 is a few more places.
Found with GCC and -Wzero-as-null-pointer-constant
2018-02-24 08:20:20 +00:00
e92ba1071d Fix Python str.format link to point to Python 3 docs 2018-02-20 17:40:49 +00:00
a7ae5666a0 Enable join on msvc 2018-02-19 21:03:51 +00:00
24d249b0b4 Fix formatting of objects convertible to string_view 2018-02-19 20:25:56 +00:00
e508e30800 Don't define FMT_LOCALE on OpenBSD
OpenBSD doesn't have strtod_l() (at least under the default
headers), so the class Locale that the macro gates won't compile.
2018-02-19 19:24:33 +00:00
0ee4273b04 Put is_enum check first not to instantiate convert_to_int unnecessarily 2018-02-18 05:47:29 +00:00
8ca3ab2c4c Revert problematic pragma 2018-02-18 05:38:32 +00:00
18ac98700e Fix formatting of objects convertible to std::string 2018-02-17 12:57:18 +00:00
ce4a65ffea Add pointer support to basic_writer 2018-02-17 09:38:46 +00:00
91721caa42 Add detection of wostream operator<< (#650) 2018-02-17 09:03:43 +00:00
1efc15c177 Fix MSVC build 2018-02-16 18:13:54 +00:00
8ed264fcd4 Rename type enum constants to prevent collision with poorly written C libs (#644) 2018-02-16 17:20:33 +00:00
4ba3f7db82 Update docs 2018-02-15 18:52:44 -08:00
7d2723d57c posix.cc: Fix compilation with -fno-exceptions
Signed-off-by: Andrew Gunnerson <andrewgunnerson@gmail.com>
2018-02-15 18:39:36 -08:00
24d66c5d65 compilation fix & warnings 2018-02-15 18:37:45 -08:00
229887bd40 Make constexpr remove_prefix gcc version check tighter (#648) 2018-02-14 05:46:41 -08:00
f3f19e762f Update docs 2018-02-11 13:43:16 -08:00
e9fa42acb8 Fix docs and build issues on gcc-4.6 2018-02-11 09:43:54 -08:00
affb35cfb9 Replace using with typedef for compatibility with gcc-4.6 2018-02-11 09:23:47 -08:00
9710c058aa Update documentation building script 2018-02-11 09:23:17 -08:00
1a4e892765 Move output_range to format.h 2018-02-11 08:36:44 -08:00
522de7b55d Replace using with typedef for compatibility with gcc-4.6 2018-02-11 08:32:02 -08:00
0b508fd29d Fix c++0x detection 2018-02-11 07:32:22 -08:00
1849735f12 Fallback to c++11 if c++14 not available 2018-02-11 07:25:53 -08:00
3239c51814 Get rid of generic lambdas 2018-02-11 07:05:14 -08:00
78166ccd36 Get rid of generic lambdas 2018-02-11 06:50:56 -08:00
d8ef8a9e9b Cleanup 2018-02-11 06:24:22 -08:00
822222181b Update README.rst 2018-02-10 07:45:32 -08:00
b00053247c Merge the std branch 2018-02-10 07:38:27 -08:00
a502decddb Added a fmt.pro to support build using qmake (#641) 2018-02-10 07:22:02 -08:00
61065e1a5c Fix unreachable code warning when signbit returns bool 2018-02-10 07:21:17 -08:00
403ae0a23b Add debug postfix for libfmt (#636) 2018-02-10 07:17:40 -08:00
5096c0fe97 Fix string_view detection 2018-02-10 07:17:29 -08:00
5b3f9eab94 Update syntax.rst 2018-02-10 07:03:44 -08:00
e802cf14e3 Add note about errno to the documentation 2018-02-10 07:01:59 -08:00
c96d64652b CMakeLists: Use GNUInstallDirs to set install location 2018-02-10 07:00:14 -08:00
dbd84697ff Update usage.rst 2018-02-10 06:54:26 -08:00
5013c15737 Silence MSVC 2017 constant if expression warning 2018-02-10 06:52:46 -08:00
cdfcee27fb Use allocator_traits if available 2018-02-10 06:51:13 -08:00
66b25ef0d0 Add examples 2018-02-10 06:33:03 -08:00
6cb68f9496 Fix warnings 2018-02-10 06:28:43 -08:00
0b635c9dc5 Fix handling of fixed enums in clang (#580) 2018-02-10 06:17:42 -08:00
66afd9b33a Fix compilation on gcc 6 2018-02-10 05:16:16 -08:00
67e070fe5a Make format work with C++17 std::string_view (#571) 2018-02-07 08:14:54 -08:00
867b330966 Remove ANDROID macro check per comment in #458 2018-02-07 07:44:15 -08:00
64599973e9 Enable stream exceptions (#581) 2018-02-07 07:36:15 -08:00
35f8f03670 Use less version 2.6.1 and sudo to fix npm install issues on travis 2018-02-07 07:17:34 -08:00
92a250fdb6 Suppress Clang's warning on zero as a null pointer 2018-02-07 07:16:00 -08:00
2f13d41e30 Add to_wstring 2018-02-07 07:08:14 -08:00
1e19ae8348 Workaround a bug in MSVC 2018-02-07 06:31:42 -08:00
3810d7e4d4 Workaround a bug in MSVC 2018-02-04 09:29:50 -08:00
5c7474e1fb Relax constexpr requirements 2018-02-04 08:58:21 -08:00
1f57243b49 Relax constexpr requirements 2018-02-04 08:52:43 -08:00
dc5403612e Conditionally compile constexpr 2018-02-04 08:21:31 -08:00
5d8ba816de Fix a segfault in test on glibc 2.26 #551 2018-02-02 19:34:08 -08:00
a9f810c188 Update README.rst 2018-02-02 19:17:19 -08:00
2582f41e12 Fix ifdefs 2018-02-02 19:16:13 -08:00
1a7d0ba2d0 Adding OpenSpace to the list of projects 2018-02-02 19:10:25 -08:00
8921f613de Update build script 2018-02-02 18:46:39 -08:00
f62e225e82 Automatically update version in release script (#431) 2018-02-02 18:45:05 -08:00
94806747df remove 'FMT_CPPFORMAT' CMake option 2018-02-02 18:42:22 -08:00
bfce29ffef Improve conversion 2018-02-02 18:40:36 -08:00
8cf30aa2be Fix segfault on complex pointer formatting (#642) 2018-02-01 21:49:03 -08:00
f164e4c72f Remove old bcc-related comments 2018-02-01 16:49:47 -08:00
c57029c1f0 Add Drake & Lyft Envoy to the list of projects 2018-02-01 16:46:41 -08:00
8fa9acb8e5 Workaround broken __builtin_clz in clang with MS codegen (#519) 2018-02-01 16:43:16 -08:00
3dae25828f Describe cmake use of header-only target 2018-02-01 16:42:53 -08:00
1c7b751d70 Fix handling of implicit conversion to integral types larger than int 2018-02-01 16:42:15 -08:00
08dff3774c Allow compiling and using as DLL in windows #502 2018-01-28 20:50:43 -08:00
c753a2af39 Don't include the world with WIN32_LEAN_AND_MEAN (#503) 2018-01-28 20:26:25 -08:00
a5185ec8d4 add SOURCELINK_SUFFIX for compatibility with Sphinx 1.5 2018-01-28 20:20:39 -08:00
768061c85e Fix FormatBuf implementation (#491) 2018-01-28 20:08:51 -08:00
0c136381e3 Move back_insert_range to format.h 2018-01-27 18:56:50 -08:00
5060568f72 %.f should have zero precision, not default precision 2018-01-27 17:56:19 -08:00
a09f748894 Add Kodi (xbmc) to the list of projects using fmt 2018-01-27 17:47:41 -08:00
f9fa7c405f Add FMT_API and FMT_OVERRIDE where needed 2018-01-27 17:15:14 -08:00
a980d3b46b Add fmt::join to format ranges (#466) 2018-01-27 16:04:45 -08:00
87eab90ea8 Fix missing intrinsic when included from C++/CLI (#457) 2018-01-27 09:25:15 -08:00
75005bbcd5 Don't export the -std=c++11 flag from the fmt target 2018-01-27 09:18:20 -08:00
19f990a9c0 Use https to fetch dependencies from github 2018-01-27 09:15:28 -08:00
bca9de9e68 Return iterator from format_to 2018-01-27 07:03:26 -08:00
0555cea5fc Added a fmt.pro to support build using qmake (#641) 2018-01-26 17:12:48 -08:00
a93270fd60 Replace a bunch of craft with type_traits, take 2 2018-01-22 18:56:53 -08:00
21429c8646 Revert "Replace a bunch of craft with type_traits"
This reverts commit e79588d6c1.
2018-01-21 18:53:38 -08:00
0473c48f88 Add std::basic_string allocator support (#441) 2018-01-21 18:21:16 -08:00
72d9fffd78 Fix test compilation for FreeBSD (#433) 2018-01-21 18:18:05 -08:00
e79588d6c1 Replace a bunch of craft with type_traits 2018-01-21 18:11:57 -08:00
3a6c7d0cbd Fix signbit detection (#423) 2018-01-21 16:41:55 -08:00
5e4c34b25a Add version macro FMT_VERSION (#411) 2018-01-21 16:36:22 -08:00
bd8a7e7ea1 More iteratification 2018-01-21 14:30:38 -08:00
f78c3e41be Fix unreachable code warning when signbit returns bool 2018-01-21 06:11:29 -08:00
0a402056bc Add CONTRIBUTING.rst 2018-01-20 19:52:19 -08:00
e35d41fff5 Add extern templates for format_float (#413) 2018-01-20 19:17:59 -08:00
d8c25a175a Use nullptr if available 2018-01-20 19:11:19 -08:00
e95e4659d9 Add syntax.rst to build 2018-01-20 17:55:43 -08:00
e51119508c argument index -> argument id 2018-01-20 17:55:28 -08:00
229ee34eea Fix compiler warnings 2018-01-20 17:54:06 -08:00
7fe0f3dabc Update ChangeLog 2018-01-20 17:39:15 -08:00
38b603a42f Update README.rst 2018-01-20 17:12:43 -08:00
a1e7e4a768 Fix compilation with -fno-exceptions (#402, #405) 2018-01-20 17:10:14 -08:00
3f24a38840 Thread-safe time formatting (#396) 2018-01-20 11:35:23 -08:00
f853d94a15 Remove unnecessary fmt/ prefix (#397) 2018-01-20 10:28:10 -08:00
9649919d01 Document use of format_arg for user-defined type #393 2018-01-20 10:07:29 -08:00
c8efe145b4 Add api.rst to build 2018-01-20 09:52:29 -08:00
da80005f11 Fix compilation on Cygwin (#388) 2018-01-20 09:52:03 -08:00
8ed163533c Fix a typo 2018-01-20 09:43:56 -08:00
1760c31b52 Workaround Doxygen mess 2018-01-20 08:53:03 -08:00
72606f2391 Add missing types to counting_iterator 2018-01-20 08:20:18 -08:00
c15710032e Add debug postfix for libfmt (#636) 2018-01-20 06:47:12 -08:00
6822466aa3 Handle nested braces in join (#638) 2018-01-20 06:26:22 -08:00
64b349aee2 More iterator support & fmt::count 2018-01-17 22:04:24 -08:00
e3b69efbe1 Suppress msvc warnings in gmock 2018-01-17 05:46:14 -08:00
322736d3bb Add support for arbitrary output iterators 2018-01-15 12:46:44 -08:00
1029119497 Cleanup 2018-01-15 11:37:39 -08:00
c1d137ed5f Add support for nonconiguous iterators 2018-01-15 11:30:53 -08:00
f6fd38bb3a More iterator support 2018-01-15 08:48:37 -08:00
c2fecb9b2a Clean API 2018-01-14 14:15:59 -08:00
9a53a706fc Add support for back_insert_iterator 2018-01-14 13:12:26 -08:00
91ee9c9acd Return iterator from the format method 2018-01-14 11:00:27 -08:00
67928eae28 Don't inherit context from parse_context 2018-01-14 09:27:40 -08:00
217e7c76f1 Pass ranges by value 2018-01-14 08:13:48 -08:00
22994c62f7 Decouple arg_formatter_base from buffer 2018-01-13 15:34:48 -08:00
00f1450d9a Update tesmplate parameter names 2018-01-13 14:57:43 -08:00
3a2e89e134 Reduce dependency on buffer 2018-01-13 12:57:27 -08:00
c719d94473 Fix experimental/string_view detection 2018-01-13 07:57:33 -08:00
cea3c20747 Give a better error message for function pointers (#633) 2018-01-13 07:02:45 -08:00
232ceabbc3 Workaround an internal compiler error in MSVC 2018-01-13 06:43:03 -08:00
c095445394 Replace buffer with range 2018-01-10 22:41:23 -08:00
c3d6c5fc4c Replace buffer with range 2017-12-30 07:42:56 -08:00
0f98773164 add transition helper to format.h
the transition from v3 to v4 introduced an API change that format.h does
not provide printf functionality. to easi the transition we introduce a
define `FMT_FORMAT_PROVIDE_PRINTF` that will pull in printf.h from format.h
2017-12-27 21:48:55 -08:00
d165d9c483 Decouple locale and buffer 2017-12-26 17:22:07 -08:00
3663414053 Parameterize basic_writer on buffer type 2017-12-26 09:00:22 -08:00
6f2769d0b4 Revert "Added support for format string containing '\0' in _format udl (#619) (#620)"
This reverts commit 3aaa25fa70 for
reasons discussed in #622.
2017-12-23 08:00:51 -08:00
5f1c73db7d Shorten a comment in locale.h 2017-12-23 08:00:38 -08:00
319346025d Update version 2017-12-20 08:38:07 -08:00
51a16f8c58 Update ChangeLog.rst 2017-12-20 08:33:31 -08:00
a00874603d Merge release branch 2017-12-20 08:30:58 -08:00
941663d038 Merge ostream.cc into ostream.h 2017-12-17 09:33:56 -08:00
955062da2e Merge printf.cc into printf.h 2017-12-17 08:36:19 -08:00
5705bf1c71 Added support for pre-c++17 experimental string_view (#607)
Added support for pre-c++17 experimental string_view
2017-12-16 09:03:11 -08:00
cabce31f45 Update syntax.rst 2017-12-16 08:58:54 -08:00
ccaae0c019 Refer to jeaiii project 2017-12-10 16:09:35 -08:00
e37151021e Add a integer formatter based on jeaiii 2017-12-10 16:05:51 -08:00
b3495f2e4b Update README.rst 2017-12-10 06:54:51 -08:00
61f296e30c Move FMT_HAS_BUILTIN to format.h 2017-12-09 08:56:44 -08:00
ce801c9095 Remove dependency on <vector> and <array> 2017-12-09 08:48:30 -08:00
41fc29907a Merge branch 'std' of github.com:fmtlib/fmt into std 2017-12-09 08:16:34 -08:00
971fb584c3 Allow mixing named and automatic arguments 2017-12-09 08:15:13 -08:00
af0f21da0f add missing inline in header-only mode (#626) 2017-12-09 07:50:53 -08:00
7cea163809 numeric -> arithmetic 2017-12-09 06:19:15 -08:00
5328907f7f Get rid of <limits> dependency 2017-12-06 09:18:17 -08:00
faaafc7e12 Remove <utility> dependency and replace typedefs with using 2017-12-06 09:13:23 -08:00
94edb1a71c Add a lightweight header for the core API 2017-12-06 07:42:42 -08:00
3aaa25fa70 Added support for format string containing '\0' in _format udl (#619) (#620)
Added support for strings containing '\0' in udl (#619)
2017-12-06 06:21:34 -08:00
84bd2f1962 Merge include/fmt/CMakeLists.txt into the main CMake file 2017-12-03 09:59:55 -08:00
7f351dec27 Decouple <locale> for better compile times 2017-12-03 09:51:59 -08:00
81bd9e8ea3 args -> format_args 2017-12-03 08:00:22 -08:00
10e70a06c9 Improve handling of custom arguments 2017-12-02 09:44:48 -08:00
f9c97de46b Add note about errno to the documentation 2017-11-28 07:33:51 -08:00
e0243000de arg_index -> arg_id 2017-11-26 10:05:49 -08:00
ac5f95208c Automatically add package to release 2017-11-25 08:23:13 -08:00
0e914372fb Avoid conflict with the macro CHAR_WIDTH
It looks like CHAR_WIDTH is a macro in glibc. See
https://sourceware.org/ml/libc-alpha/2016-09/msg00225.html
2017-11-25 07:25:06 -08:00
f03a35a679 Check string specs at compile time 2017-11-24 09:54:28 -08:00
e9da574147 Check char specs at compile time 2017-11-24 07:54:22 -08:00
b25a029284 Check pointer type specs are compile time 2017-11-23 10:12:23 -08:00
c8a9d902dd Check floating-point type specifiers 2017-11-23 09:14:37 -08:00
6570dc3122 Disallow formatting of multibyte strings into a wide buffer (#606) 2017-11-23 07:23:07 -08:00
3851994ab0 Fix yet another internal compiler error in MSVC 2017-11-19 09:06:49 -08:00
44e186512b Refactor parse context and fix warnings 2017-11-19 08:49:58 -08:00
e7e270f511 Test error on invalid type spec and remove unused alias 2017-11-19 08:25:34 -08:00
692b82d32c UdlArg -> udl_arg 2017-11-19 08:02:07 -08:00
c523dd584f Use error handler to report errors 2017-11-19 07:36:01 -08:00
5a32e64b05 More tests 2017-11-19 07:03:12 -08:00
093e2a4780 Improve error handling 2017-11-18 09:16:35 -08:00
dc104cbaaa Workaround internal compiler errors in MSVC 2017-11-18 09:05:05 -08:00
39411504a5 More tests 2017-11-18 08:16:59 -08:00
e3eb5ea074 Add parse_context::error_handler() 2017-11-18 06:58:14 -08:00
734e722da4 Fix warnings 2017-11-18 06:56:29 -08:00
62af25dca8 Workaround yet another MSVC internal error 2017-11-18 06:31:47 -08:00
594bd8feba More tests 2017-11-16 06:55:49 -08:00
f2b52bba05 More tests 2017-11-15 07:06:03 -08:00
62df6f27cb CMakeLists: Use GNUInstallDirs to set install location
CMake's GNUInstallDirs knows where particular Linux architectures and
distributions want to have their libraries installed. In particular,
Debian-derived "multi-arch" distributions keep their libraries in triplet
sudirectories under /lib. Other "bi-arch" distributions keep 64-bit
libraries in /lib64.

Including GNUInstallDirs and using CMAKE_INSTALL_LIBDIR and
CMAKE_INSTALL_INCLUDEDIR means that fmt's libraries and header files are
installed in the correct locations.

Tested with OpenEmbedded and on Debian GNU/Linux 9 (the special naming only
applies when installing in /usr.)
2017-11-13 22:01:41 -08:00
dfdb1adea5 More tests 2017-11-12 10:03:39 -08:00
7967c2f874 Disable test that triggers an MSVC bug 2017-11-12 09:47:15 -08:00
18a0b94b0e Fix overflow check 2017-11-12 09:25:28 -08:00
493586cbca Fix overflow check 2017-11-12 07:09:36 -08:00
1d751bc617 fix warning in header: signed/unsigned comparison 2017-11-12 06:23:57 -08:00
686ff942af Fix compile-time parsing and add more tests 2017-11-11 11:40:56 -08:00
5b95b5d77c Test compile-time errors 2017-11-11 10:28:05 -08:00
246bdafc74 Add FMT_STRING macro for compile-time strings 2017-11-11 07:39:12 -08:00
e805543341 Remove FMT_USE_VARIADIC_TEMPLATES 2017-11-11 07:02:58 -08:00
dba1ccc4d7 Update readme 2017-11-10 07:38:51 -08:00
e613b3c7b1 Update readme 2017-11-10 07:24:16 -08:00
11415bce3c Update usage.rst 2017-11-08 18:27:10 -08:00
9982dd0130 Fix for warning C5030 in VS2015 2017-11-08 18:18:36 -08:00
9fda7a36fd Check integral type specs at compile time 2017-11-08 07:58:09 -08:00
92847a0d11 Add integral type handler 2017-11-08 05:56:52 -08:00
a03842b0d5 More compile-time checks 2017-11-05 13:26:19 -08:00
42e88c4fcb Silenced MSVC 2017 constant if expression warning 2017-11-05 12:27:48 -08:00
1c855a4762 Integrate constexpr format specs parsing 2017-11-05 09:28:50 -08:00
780b44bf82 Add compile-time format string check 2017-11-04 09:02:47 -07:00
8ca6e76dbc Detect user-defined literal templates 2017-11-04 08:23:24 -07:00
a7e986166a Workaround another MSVC madness 2017-10-29 08:19:55 -07:00
db9ffa1405 Make parse_format_string constexpr 2017-10-29 07:32:14 -07:00
e926ae78ac Add parse_format_string 2017-10-29 07:00:47 -07:00
57e266ab1d Rename handlers 2017-10-27 06:44:00 -07:00
d29c7c3aca Workaround a bug in MSVC 2017-10-25 07:37:50 -07:00
aadb38a5e6 Make specs_checker constexpr 2017-10-24 07:46:30 -07:00
dd0b72e1ee Remove refactoring artefacts 2017-10-22 14:44:52 -07:00
e52b10e33f Merge branch 'vitaut-patch-1' of github.com:fmtlib/fmt into std 2017-10-22 10:35:37 -07:00
529d88ce95 Make dynamic_format_specs construction constexpr 2017-10-22 10:19:09 -07:00
d2f2a8b0ca constexpr support of dynamic width and precision 2017-10-22 09:32:46 -07:00
7a9c1ba190 FMT_VARIADIC_CONST - Support for const variadic methods (#591)
FMT_VARIADIC_CONST - Support for const variadic methods
2017-10-22 08:55:40 -07:00
6b3840b73c Make format_specs construction constexpr 2017-10-22 08:18:26 -07:00
a38bd9ca24 Fix formatting and naming 2017-10-22 07:19:45 -07:00
91014f0171 Naming conventions 2017-10-22 06:43:41 -07:00
932ab2bfca Report error from parse_nonnegative_int via handler 2017-10-21 08:37:52 -07:00
0ebdf41efa Fix compile-test 2017-10-21 08:17:00 -07:00
170f5c671f Move headers to include/fmt 2017-10-21 07:38:49 -07:00
3d11eac784 Workaround another MSVC constexpr bug 2017-10-21 07:13:20 -07:00
c69e308690 Update README.rst 2017-10-20 18:00:31 -07:00
25aac0bee5 Fix travis build on macOS 2017-10-20 06:47:17 -07:00
b83241ff4d Make format spec parsing constexpr 2017-10-19 07:36:46 -07:00
bd5188c811 Remove MinGW because it's not on appveyor image 2017-10-19 06:46:25 -07:00
62616b88a6 Workaround a bug in MSVC's constexpr handling 2017-10-19 06:06:13 -07:00
b8f85f671f Use Visual Studio 2017 image on appveyor 2017-10-18 08:38:16 -07:00
7174de0d79 Fix contexpr-ness of pointer_from 2017-10-18 06:36:08 -07:00
3785afc5a3 Pass errors to handler instead of throwing (#566) 2017-10-18 06:28:18 -07:00
324415c036 Use allocator_traits if available.
This is to avoid using functionality deprecated in C++17.
2017-10-18 06:11:15 -07:00
1b5ccf6c13 Make parse_arg_id constexpr 2017-10-15 16:54:47 -07:00
5f39721c0a Fix a warning 2017-10-15 14:58:41 -07:00
ca96acbe4f Add examples 2017-10-15 07:38:03 -07:00
708d9509ff fix(Clang CodeGen): remove warnings
./fmt/fmt/format.h(308,10): warning : unknown pragma ignored [-Wunknown-pragmas]
         ^
1 warning generated.
format.cc In file included from fmt\fmt\format.cc:28:
fmt\fmt/format.h(308,10): warning : unknown pragma ignored [-Wunknown-pragmas]
         ^
fmt\fmt\format.cc(165,17): warning : 'strerror' is deprecated: This
function or variable may be unsafe. Consider using strerror_s instead.
To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for
details. [-Wdeprecated-declarations]
      buffer_ = strerror(error_code_);
                ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\string.h(178,24) :  note: 'strerror' has been explicitly marked deprecated here
_ACRTIMP char* __cdecl strerror(
                       ^
fmt\fmt\format.cc(78,37): warning : unused function 'strerror_s' [-Wunused-function]
static inline fmt::internal::Null<> strerror_s(char *, std::size_t, ...) {
                                    ^
3 warnings generated.

refactor: use attribute to remove -Wunused-function warnings instead of dummy function call
2017-10-15 07:04:45 -07:00
9328a074b1 Fix handling of fixed enums in clang (#580) 2017-10-14 08:47:08 -07:00
2c077dd442 Enable stream exceptions (#581) 2017-10-14 07:38:16 -07:00
933a33a794 Added MSVC checking for support for string_view.
Also, driveby adding "override" to classes with inherited virtual destructors.
2017-10-08 19:44:09 -07:00
17f93fe084 Make basic_string_view ctors constexpr 2017-09-29 12:26:57 -07:00
d5e918b61f Detect C++14 compiler support 2017-09-28 08:57:54 -07:00
be5b4552d9 Make null_terminating_iterator more iteratory 2017-09-27 22:40:58 -07:00
643fb0662e Check for argument indexing switch 2017-09-27 21:18:37 -07:00
bef89db6e7 Fix a bogus -Wduplicated-branches gcc warning (#573) 2017-09-27 19:32:53 -07:00
d45544d14e Fix width handling in dynamic formatting 2017-09-27 19:04:15 -07:00
2a619d96dd Make format work with C++17 std::string_view (#571)
Tests for C++17 std::string_view
2017-09-20 06:21:11 -07:00
8cbf544733 Add parse context 2017-09-17 09:05:01 -07:00
e051de37f3 Use less version 2.6.1 and sudo to fix npm install issues on travis 2017-09-17 08:41:17 -07:00
5de459bf33 Suppress Clang's warning on zero as a null pointer 2017-09-16 18:44:29 -07:00
ec4f5175f1 Replace Range with ParseContext in parse() 2017-09-16 17:07:03 -07:00
83dd2ab919 Simplify dynamic_specs_handler 2017-09-16 15:30:13 -07:00
5a8ae0bb05 Fix a warning 2017-09-13 08:36:06 -07:00
39bc319b35 Update test results 2017-09-10 07:35:32 -07:00
534bff7d31 Fix handling of max packed arguments 2017-09-09 07:38:52 -07:00
0cda806dcc Fix compile tests 2017-09-08 11:25:49 -07:00
a3191a9903 Get rid of FMT_MAKE_WSTR_VALUE macro 2017-09-08 08:42:01 -07:00
fced79b0ee Get rid of old compat macros 2017-09-08 08:26:05 -07:00
be887d9269 Replace internal::get with std::declval 2017-09-08 08:09:28 -07:00
53cf073561 Get rid of FMT_MAKE_VALUE macro 2017-09-08 07:43:04 -07:00
2972de4ba3 Char -> char_type 2017-09-06 07:29:48 -07:00
9ee7c2163c Type -> type 2017-09-06 07:12:07 -07:00
1a09194ae6 Cleanup type handling 2017-09-06 07:00:21 -07:00
c18a4041f9 Remove conditional and to_iterator 2017-09-04 13:56:14 -07:00
1cade7ef4d Remove FMT_USE_RVALUE_REFERENCES 2017-09-04 13:52:29 -07:00
7413239f49 Remove unnecessary qualification 2017-09-04 13:12:52 -07:00
af00e4f9c9 Remove printf_arg_formatter from format.h and cleanup 2017-09-04 12:28:53 -07:00
44a26e5e21 CharPtr -> pointer_type and move to writer 2017-09-04 11:58:14 -07:00
0fbd846561 Replace fmt::internal::make_unsigned with std::make_unsigned 2017-09-04 11:41:15 -07:00
8a2bc0ab1b Add nullptr support 2017-09-04 11:10:08 -07:00
80505995d0 Allow delayed type checking 2017-09-04 09:33:22 -07:00
165895346c Make ArgMap::init not explicitly instantiated (#563)
Make ArgMap::init not explicitly instantiated
2017-09-03 19:26:08 -07:00
3e75d3e001 Fix handling of types convertible to int 2017-09-02 07:08:19 -07:00
b0867f3fa0 AlignSpec -> align_spec and fix a warning 2017-08-27 09:56:45 -07:00
89654cd127 to_wstring added 2017-08-27 18:52:57 +02:00
f194a418f9 Replace fmt::is_same with std::is_same 2017-08-27 09:16:50 -07:00
47c84d7974 Move part of write API (spec factories) to a separate header 2017-08-27 09:08:44 -07:00
20168147dd Add ptr, a helper function for pointer formatting 2017-08-27 08:41:28 -07:00
77c892c88e Fix more warnings 2017-08-27 08:16:46 -07:00
be7d72ba0d Fix expansion-to-defined warning 2017-08-27 08:00:15 -07:00
d4c504ae1c Fix a warning 2017-08-27 06:38:23 -07:00
27ad6cee82 Use standard enable_if 2017-08-26 10:41:58 -07:00
64681739fd Fix a warning 2017-08-26 09:32:37 -07:00
388061674a Remove FMT_HAS_GXX_CXX11 2017-08-26 09:23:00 -07:00
a7320bdce9 Fix a warning 2017-08-26 09:19:03 -07:00
016acebb56 Remove legacy code 2017-08-26 09:09:43 -07:00
07f8ffc44f Suppress shadowing warnings 2017-08-26 08:50:09 -07:00
466386d5cd Suppress a warning in gmock 2017-08-26 08:50:09 -07:00
70ef82a8e3 Workaround a bug in MSVC 2017-08-20 09:47:21 -07:00
37eb419af2 Fix noreturn attribute detection (#555) 2017-08-20 09:39:28 -07:00
14d8534900 Explicitly cast range length to std::size_t to prevent conversion warnings 2017-08-20 06:52:52 -07:00
c2201ce02e Accept wide chars as integers to prevent conversion warning 2017-08-20 06:52:52 -07:00
6efbccb387 Add one more CMake warning fix
This will remove one more warning that can't be stopped from a calling CMakeLists. This possibly should be set to new at some point (CMake 3.3 behavior would be different / better), as well as 0048.
2017-08-19 07:03:56 -07:00
5e0562ab51 Separate parsing and formatting 2017-08-13 13:09:02 -07:00
032c83807f Fix a segfault in test on glibc 2.26 #551, take 2 2017-08-10 09:27:06 -07:00
6655e804c4 Fix a segfault in test on glibc 2.26 #551 2017-08-06 20:18:04 -07:00
1102d46508 Make format spec parsing context-independent 2017-07-30 08:58:24 -07:00
45911770c5 Separate parsing and formatting in extension API 2017-07-29 07:50:16 -07:00
7bd776e7db Explain why null_terminating_iterator is used 2017-07-26 08:48:59 -07:00
873c8451ed Remove system_header pragma 2017-07-26 08:42:57 -07:00
9f7957c073 Separate argument parsing and formatting 2017-07-26 08:37:46 -07:00
da439f2838 Suppress warning about missing noreturn attribute (#549)
Suppress warning about missing noreturn attribute

Adding `[[noreturn]]` to `report_unknown_type` suppresses the Clang/GCC `-Wmissing-noreturn` warning:

Clang outputs:

    .../fmt/fmt/format.cc:294:74: warning:
          function 'report_unknown_type' could be declared with
          attribute 'noreturn' [-Wmissing-noreturn]
      ...code, const char *type) {
                                 ^

GCC outputs:

    .../fmt/fmt/format.cc:294:74: warning: function might be candidate for
        attribute 'noreturn' [-Wsuggest-attribute=noreturn]
      ...code, const char *type) {
                                 ^

Cherry-picked d16c4d.
2017-07-23 20:21:11 -07:00
eefdb379f9 Fix an unused argument warning 2017-07-23 20:15:52 -07:00
2f4f49fd60 Switch from cstring_view to string_view 2017-07-22 08:24:37 -07:00
d16c4d20f8 Suppress warning about missing noreturn attribute (#549)
Suppress warning about missing noreturn attribute

Adding `[[noreturn]]` to `report_unknown_type` suppresses the Clang/GCC `-Wmissing-noreturn` warning:

Clang outputs:

    .../fmt/fmt/format.cc:294:74: warning:
          function 'report_unknown_type' could be declared with
          attribute 'noreturn' [-Wmissing-noreturn]
      ...code, const char *type) {
                                 ^

GCC outputs:

    .../fmt/fmt/format.cc:294:74: warning: function might be candidate for
        attribute 'noreturn' [-Wsuggest-attribute=noreturn]
      ...code, const char *type) {
                                 ^
2017-07-21 20:47:01 -07:00
9c56a8ce5c Make format_arg() accept class hierarchies
If a base class can be formatted, it is assumed
that the hierarchy can be formatted from the base
class. The idiom is not uncommon with ostreams.
2017-07-18 06:16:46 -07:00
a8d6f309c8 Minor optimizations 2017-07-17 06:52:56 -07:00
ca0e38304c Update README.rst 2017-07-16 14:12:48 -07:00
d16582a038 Move printf-related code to printf.cc 2017-07-15 09:46:18 -04:00
81790d726f Update format.h to remove C4574 error on MSVC 14.2
Similar to the Pullrequest #539, `_SECURE_SCL` caused the same  `warning C4574: '_SECURE_SCL' is defined to be '0': did you mean to use '#if _SECURE_SCL'`.  `_SECURE_SCL` is defined in the `MSVC/14.10.25017/include/yvals.h` by Microsoft itself
2017-07-14 15:29:57 -04:00
3028344380 Fix undefined behavior in UDL macro
`FMT_USE_USER_DEFINED_LITERALS` macro expands to `defined()` which is undefined behavior.
2017-07-13 19:10:11 -04:00
361911dd18 Use preinstalled version of cmake on travis 2017-07-13 19:06:20 -04:00
9ea183aaba Fix MSVC build 2017-07-13 19:00:21 -04:00
8f4b918c5b Check argument index 2017-07-12 13:24:51 -04:00
4193485b43 Remove test files 2017-07-12 13:15:06 -04:00
07123e8ff3 Use Ubuntu Trusty on Travis for a new CMake 2017-07-12 13:13:36 -04:00
586d63636a Implement more efficient handling of large number of format arguments 2017-07-12 00:26:54 -04:00
4045d7fea2 Fix warning about missing ' character 2017-07-11 20:45:17 +02:00
89c3bc585c Remove warning C4668 in MSVC for FMT_GCC_VERSION and FMT_HAS_GXX_CXX11 2017-07-10 13:59:08 -04:00
4af9421ff0 Adding OpenSpace to the list of projects 2017-07-07 20:59:39 -07:00
1a398b5404 Fixed CMake CMP0048 warning. 2017-07-05 16:55:46 -07:00
589ccc1675 Bump version 2017-07-01 10:37:45 -07:00
c38170461d Add an error on broken includes 2017-07-01 10:09:25 -07:00
16bdd8424f Update scripts 2017-07-01 07:30:51 -07:00
b492316d5d Update version list 2017-07-01 06:57:32 -07:00
91f4ce02b6 Automatically update version in release script (#431) 2017-07-01 06:41:30 -07:00
398343897f Update version 2017-06-27 19:02:24 +02:00
749ed39d79 Bump version number and update changelog 2017-06-25 19:40:23 +02:00
aba72982df remove 'FMT_CPPFORMAT' CMake option 2017-06-25 08:08:26 -07:00
e8ef103799 Fix undefined-var-template warning on clang when not compiling with -std=c++11 2017-06-25 07:49:31 -07:00
5e23fff052 remove unnecessary method 2017-06-25 06:07:57 -07:00
f61e71ccb9 Add Drake to projects 2017-06-22 06:31:50 -07:00
d9f0c58c65 Add Lyft Envoy to the list of projects 2017-06-22 06:20:51 -07:00
569c5bdbf1 Workaround broken __builtin_clz in clang with MS codegen (#519) 2017-06-17 07:57:07 -07:00
eafc6a3292 Update Changelog 2017-06-14 18:20:51 +02:00
dc8c943372 Describe cmake use of header-only target 2017-05-29 16:31:52 -07:00
ac5484c4e7 add alias targets with fmt namespace
For the consumer it should not matter if fmt has been added to the
project as subdirectory or via find_package. With the alias targets
the library can be always imported via fmt::fmt.
2017-05-25 14:36:16 +03:00
746adc5e71 added new namespace to the header only target in the find package test 2017-05-25 14:36:16 +03:00
048d2aec27 CMake imported targets should be namespaced 2017-05-21 14:17:12 +03:00
e14bac62a0 Changing ArgArray template argument from unsigned to size_t
Each instantiation of ArgArray template uses sizeof operator, which
returns a std::size_t value. GCC 7.1 warns about invalid conversion
(error: conversion to ‘unsigned int’ from ‘long unsigned
int’ may alter its value [-Werror=conversion]).
2017-05-20 07:19:16 +02:00
0284a2893a Use Ubuntu Trusty on Travis for a new CMake 2017-05-20 08:07:57 +03:00
07ed421521 Fix handling of implicit conversion to integral types larger than int (#507) 2017-05-06 10:23:20 -07:00
c56d345985 Don't define WIN32_LEAN_AND_MEAN in header-only mode 2017-05-06 09:13:32 -07:00
dcfd40a1b8 Revert #456
Revert #456 because it causes issues for known types (#495) and is not C++98-compatible.
2017-05-06 08:36:54 -07:00
79f11dbaa7 Allow compiling and using as DLL in windows (#502)
* printf.h fixed to compile clean - need to check whether this is the right
thing to do

* fix warnings and errors in test compiles with BUILD_SHARED_LIBS

* did requested changes and added one change to allow all tests to succeed
in windows DLL
2017-05-05 14:58:09 +02:00
52aabbe7ef Workaround MSVC lookup issue in ArgFormatterBase
Fixes #505.
2017-05-05 14:40:58 +02:00
4423490d0b Don't include the world with WIN32_LEAN_AND_MEAN (#503) 2017-05-03 21:22:01 +02:00
d49f206183 fmt::internal::is_streamable works on gcc 4.7
i test the the code on https://gcc.godbolt.org/, and only gcc 4.7 works,
gcc 4.6 fail to complie
2017-04-16 21:27:28 -07:00
7a4ac9ec9c add SOURCELINK_SUFFIX for compatibility with Sphinx 1.5
With Sphinx 1.5, this is needed by searchtools.js to display the source
snippets (see sphinx-doc/sphinx#2454).

With earlier Sphinx versions, this is a no-op because the undefined variable
will evaluate to an empty string.
2017-04-15 08:42:05 -07:00
82bb4f4e89 Fix Visual Studio 2017 new warning (C4244: 'argument': conversion from 'int' to 'const char', possible loss of data) 2017-04-15 08:38:43 -07:00
73ca9948fe Fix FormatBuf implementation (#491)
Fixes #491 (and probably #480) Before, the put-area of the custom streambuf
implementation was (sometimes) incorrectly extended beyond the writeable buffer.
The new implementation is in some cases not as efficient as the old, but avoids
to write into uninitialized memory.
2017-04-08 09:07:33 -07:00
cbac016cce %.f should have zero precision, not default precision 2017-04-08 07:18:10 -07:00
12252152ac CStringRef -> cstring_view 2017-03-26 15:13:10 -07:00
5aa8d6ea21 Return locale by value 2017-03-25 08:57:23 -07:00
32ec13f149 Switch to C++ locale 2017-03-25 08:20:06 -07:00
b4f4b7e21a Clean the buffer API (#477) 2017-03-12 09:48:21 -07:00
f423e46835 Replace clear() with resize(0) and data_ -> store_ 2017-03-11 08:30:15 -08:00
c03f55ec3a Add Kodi (xbmc) to the list of projects using fmt 2017-03-11 08:28:52 -08:00
23b8c24da4 Add noexcept 2017-03-11 07:38:16 -08:00
7175bd8ae6 Fix error on MinGW 2017-03-09 06:09:43 -08:00
7258d1b8f3 Fix tests 2017-03-08 08:08:08 -08:00
fbc8ea8c3e False -> FalseType (#483) 2017-03-08 07:17:08 -08:00
6c3aa28c94 fix for nvcc_wrapper compiler 2017-03-08 06:20:52 -08:00
e3b5d806a8 Don't bring Arg struct into global namespace
This fixes compiling fmtlib in header-only mode when user code also has
something called 'Arg' defined. Now qualifying Arg struct with internal
namespace.
2017-03-08 06:19:11 -08:00
3610f34c70 Fix windows build 2017-03-04 07:10:54 -08:00
cc736e7611 Remove redundant include (#479) 2017-03-03 06:06:34 -08:00
789ebea863 Merge branch 'printf' of github.com:fmtlib/fmt 2017-02-26 07:17:38 -08:00
6f8006c2ce Add printf overloads that takes a writer (#476) 2017-02-25 09:58:42 -08:00
589b93de45 Add default copy constructor to SystemError (#475)
* Add default copy constructor to SystemError
* Add FMT_DEFAULTED_COPY_CTOR macro
2017-02-25 09:37:06 -08:00
db0d54f855 Fix error on MinGW 2017-02-25 09:00:56 -08:00
703960aa54 Merge branch 'master' of github.com:fmtlib/fmt 2017-02-24 07:06:12 -08:00
e208fbff52 Document which header defines formatting functions 2017-02-24 07:06:05 -08:00
572491ad1f Document which header defines formatting functions 2017-02-24 07:04:44 -08:00
20089c23ca Added missing FMT_OVERRIDE specifier to FormatBuf::overflow (#473) 2017-02-22 20:55:15 +01:00
c333dca065 Follow standard naming conventions 2017-02-21 06:56:26 -08:00
6a2ff287b2 Follow standard naming conventions 2017-02-19 08:05:41 -08:00
eedfd07f8b internal::MemoryBuffer -> basic_memory_buffer 2017-02-18 09:13:12 -08:00
4ec8860783 ArgFormatter -> arg_formatter 2017-02-18 07:46:32 -08:00
50e716737d StringRef -> string_view, LongLong -> long_long 2017-02-18 07:34:52 -08:00
e022c21ddc Fix windows build 2017-02-18 06:29:33 -08:00
87b691d80c Merge StringWriter into StringBuffer 2017-02-17 06:23:16 -08:00
c2f021692f Merge ArrayWriter into FixedBuffer 2017-02-17 06:09:26 -08:00
fefaf07b6f Pass buffer instead of writer to format_value 2017-02-14 19:39:34 -05:00
6e568f3a08 buffer -> basic_buffer 2017-02-14 12:08:37 -05:00
ad6d78f2a8 added FMT_API declarations where needed when using FMT_EXPORT from a separate dll 2017-02-12 12:14:58 -05:00
a00006119f Add join argument allowing formating list of values separated by a (#466)
Add join argument allowing formating list of values separated by a
string. Each value is formated according the format specifier.
2017-02-08 06:55:12 -08:00
bb1c82ef7d Fix build 2017-02-05 08:04:13 -08:00
a13b96ed88 Simplify API 2017-02-05 06:54:03 -08:00
624c58682d Simplify API 2017-02-05 06:41:39 -08:00
7ae8bd7073 basic_format_arg -> basic_arg, Buffer -> buffer 2017-02-05 06:09:06 -08:00
bf0f107564 Parameterize format_specs on character type 2017-01-28 13:17:47 +00:00
296e9cada2 FrmatSpec -> format_spec 2017-01-28 12:51:35 +00:00
b5fb8dd18b stream -> buffer 2017-01-28 12:44:36 +00:00
984a102921 Remove IntFormatSpec and StrFormatSpec 2017-01-28 04:26:48 -08:00
4863730eca Remove pad 2017-01-22 19:11:47 -08:00
aaa0fc396b Improve compatibility with old compilers and fix test 2017-01-22 12:16:16 -08:00
aea5d3ab00 Improve compatibility with older gcc and update tests 2017-01-22 11:50:52 -08:00
8485027710 Use named argument emulation instead of nested functions 2017-01-22 11:28:55 -08:00
ec15ef7b7b Replace operator<< with write function 2017-01-22 10:00:34 -08:00
bc6af7548b Fix Android not being detected with latest NDK toolchain (#458)
When using the NDK 13b toolchain standalone or with CMake, ANDROID is not defined,
but __ANDROID__ is defined instead.
2017-01-20 11:20:43 +01:00
67662702aa allow to stream user defined types in a MemoryWriter (#456)
* allow to stream user defined types in a MemoryWriter

* fix indent

* follow Google C++ Style

* make code c++98 compatible

* fix macro usage

* disable ability to stream user defined types if not at least c++11

* fix for disable ability to stream user defined types if not at least c++11

* use FMT_STATIC_ASSERT
2017-01-19 20:47:43 +01:00
9e9ad57f58 Workaround an nvcc bug 2017-01-19 06:24:15 -08:00
a2596d685d Fix missing intrinsic when included from C++/CLI
Managed C++ code doesn't have the _BitScanReverse* intrinsics, we must use the fallback code for count_digits etc.
2017-01-18 06:23:25 -08:00
d8754af063 Allow %s as generic format specifier in printf (#453)
* Allow %s as generic format specifier in printf

Signed integers are formatted as %d
Unsigned integers are formatted as %u
Doubles are formatted as %f
Chars are formatted as %c
Void Pointers are formatted as %p

* Remove '%S' handling and use visitor for generic format strings

* Default for floating point is now "%g" rather than "%f"
2017-01-14 11:45:48 -08:00
e0251fdcef BasicContainerWriter utility added 2017-01-05 20:44:35 -08:00
b77c8190ca FPUtil -> fputil 2016-12-30 13:12:27 -08:00
8428621ddc BasicWriter -> basic_writer 2016-12-30 12:26:12 -08:00
e1689cb985 Custom FormatSpec (#439) (#444)
* A custom FormatSpec type can be passed as a template argument to the ArgFormatter chain (#439)

* Corrected nested-name-specifier error

* Spec template argument defaulted to FormatSpec

* Forward declaration of FormatSpec

* Style

* Style (part 2)

* Style (part 3)
2016-12-30 11:29:40 -08:00
939aff2936 Remove unnecessary template arg from basic_format_args 2016-12-30 10:19:38 -08:00
f69786a715 Remove Not 2016-12-30 09:29:41 -08:00
b2a0d8914a Merge value and MakeValue 2016-12-30 09:25:01 -08:00
acd1811c50 Value -> value 2016-12-30 08:05:26 -08:00
42a319074c Parameterize Value on context 2016-12-29 18:07:05 -08:00
a4d6cb32d1 Clean up basic_format_arg 2016-12-29 17:17:18 -08:00
b9aaa507fc Don't export the -std=c++11 flag from the fmt target 2016-12-29 16:04:16 -08:00
d705d51671 Parameterize basic_format_arg on context (#442) 2016-12-29 15:25:22 -08:00
02553d13a0 Use https to fetch dependencies from github 2016-12-29 10:44:02 -08:00
422236af7c Don't erase writer type 2016-12-28 07:55:33 -08:00
abb6996f36 MakeArg -> make_arg 2016-12-27 07:55:44 -08:00
ee1651ce07 Handle empty format_arg state 2016-12-27 07:43:25 -08:00
3bbc5799b6 Fix MinGW build 2016-12-26 12:20:49 -08:00
63fcfc5798 Fix build on older gcc 2016-12-26 10:55:30 -08:00
db780cb119 Add std::basic_string allocator support to StringRef, StringBuffer and relatives (#441)
* - added basic_string allocator support to BasicStringRef, BasicCStringRef, BasicWriter::str, StringBuffer and BasicStringWriter

* - removed templated str() and to_string() function
- code style fixes
2016-12-26 08:36:56 -08:00
d86e51e9c1 Don't inherit basic_format_arg from internal::Value 2016-12-24 07:46:50 -08:00
f05888692c Fix handling of unpacked args (#437) 2016-12-23 08:24:48 -08:00
1183621867 Add support for exotic character types 2016-12-15 08:36:18 -08:00
763ca9780f Parameterize Value on character type 2016-12-15 08:26:10 -08:00
6cba8fe9ba Move stuff out of internal::Value 2016-12-15 07:51:40 -08:00
fac5546321 Fix test compilation for FreeBSD (#433) 2016-12-14 06:28:41 -08:00
e1ee5bf0ba Replace StringValue with StringRef 2016-12-11 21:13:54 -08:00
0854f8c3bf Parameterize formatting argument on char type. 2016-12-11 15:43:11 -08:00
9cf6c8fdc6 Get rid of fmt::internal::Arg 2016-11-26 10:21:31 -08:00
5f022ae081 Remove FMT_DISPATCH 2016-11-20 10:14:23 -08:00
41d4bcf0cc Ingore Xcode files 2016-11-20 10:13:16 -08:00
284297019f Merge BasicArgFormatter and ArgFormatter 2016-11-20 09:36:27 -08:00
d4084ac5b1 Get rid of ArgVisitor 2016-11-20 09:11:13 -08:00
d58cc8a4a8 Merge BasicPrintfArgFormatter and PrintfArgFormatter 2016-11-20 07:42:38 -08:00
796beaaddb Fix collision with global convert function (#425) 2016-11-19 12:05:49 -08:00
e2dfd39c75 Update arg visitors 2016-11-19 09:29:09 -08:00
751ff64bdb Update ArgConverter to the new visitor API 2016-11-19 08:40:24 -08:00
c9dc41ab3f Replace ArgVisitor::visit with a free visit function 2016-11-19 07:59:54 -08:00
caa60b9c99 Update comment 2016-11-19 07:41:28 -08:00
95a53e1f62 Refactor argument visitor API (#422) 2016-11-19 07:39:07 -08:00
def687462c Fix signbit detection (#423) 2016-11-14 20:14:52 -08:00
6d24116763 Improve visitor API 2016-11-13 09:42:17 -08:00
25f8ad13dd Correction of 418 (#420) 2016-11-11 18:27:39 +01:00
1d2049b53e Issue #418 - Minimal supported library subset (#419) 2016-11-10 20:29:12 +01:00
f5b1c16e2c Add version macro FMT_VERSION (#411) 2016-11-07 19:04:44 -08:00
a1dd524b6f format_arg -> do_format_arg 2016-11-07 18:22:21 -08:00
55a1ac5035 Fix test 2016-11-07 08:55:40 -08:00
85793a18cd Simplify API 2016-11-06 19:27:14 -08:00
9998f66f8c Replace formatter with context 2016-11-06 18:59:17 -08:00
cfd00af37a Fix warnings on C++98 2016-11-06 12:58:49 -08:00
6274401919 Fix warnings 2016-11-06 12:37:31 -08:00
2fa4655af6 Fix warning in FMT_STATIC_ASSERT on older GCC (#414) 2016-11-06 11:48:01 -08:00
8cef95f7c3 Create pull_request_template 2016-11-06 20:22:43 +01:00
922ae4896b Add CONTRIBUTING file 2016-11-06 11:00:58 -08:00
05ba3e7888 Fix Klockwork compilation warning 2016-11-06 10:01:55 -08:00
1daddec151 FMT_NULLPTR -> FMT_NULL and improve formatting 2016-11-06 09:05:58 -08:00
d8867a2b07 Fix missing '>' 2016-11-05 21:09:31 +01:00
6c0125785b Add extern templates for format_float
Fixes #413.
2016-11-05 21:03:40 +01:00
49ccb2e449 Using FMT_NULLPTR instead of literal 0 2016-11-03 06:39:40 -07:00
7ce7def515 argument index -> argument id 2016-11-01 17:00:59 -07:00
8f455c10b0 fix newer clang warnings 2016-11-01 07:05:34 -07:00
e599fe7436 Add 3.0.1 Changelog entry 2016-11-01 10:49:34 +01:00
c577f72596 Update README.rst 2016-10-31 18:19:49 -07:00
15d0f32773 Fix Windows compilation with -fno-exceptions (#405) 2016-10-31 21:55:52 +01:00
8c63ea432c Fix Linux compilation with -fno-exceptions (#402) 2016-10-29 16:16:40 -07:00
2bba420337 Pass writer directly to format_value (#400) 2016-10-26 17:54:11 -07:00
b656a1c133 Make value the second argument to format_value 2016-10-25 06:19:19 -07:00
edf98792a5 Pass writer to format_value 2016-10-25 05:55:40 -07:00
64ca334a2d CharType -> Char 2016-10-22 09:15:28 -07:00
be613204ab Char -> char_type 2016-10-22 08:19:19 -07:00
f85d5f4dac BasicFormatter -> basic_formatter 2016-10-22 08:04:20 -07:00
18dfa257d0 Pass correct formatters to make_format_args 2016-10-21 06:46:21 -07:00
abbefd7166 CHAR_WIDTH -> CHAR_SIZE to avoid collision with ISO/IEC TS 18661-1:2014 macro 2016-10-19 06:52:55 -07:00
ed874df293 Merge branch 'master' of github.com:fmtlib/fmt 2016-10-17 07:00:58 -07:00
1e018e65cb Thread-safe time formatting
This adds thread-safe (at least on platforms that provide necessary extensions) replacement functions for std::localtime and std::gmtime. Alternatively they could be placed in a new source file time.cc, but time.h seems so empty right now...
2016-10-17 07:00:04 -07:00
1500f00525 Remove unnecessary "fmt/" prefix which should be maintained with additional include_directories() in each project. (#397) 2016-10-11 06:45:04 -07:00
dafbec7553 Fix type safety when using custom formatters (#394) 2016-10-07 08:37:06 -07:00
506435bf71 Fix formatting 2016-10-07 03:41:23 -07:00
f287994084 Fix formatting 2016-10-07 03:22:14 -07:00
4809e2956a Minor documentation changes 2016-10-06 07:38:19 -07:00
61fb85618c Merge pull request #393 from pwm1234/master-pwm
Document use of format_arg for user-defined type
2016-10-06 06:49:34 -07:00
88c4bc33d2 Document use of format_arg for user-defined type 2016-10-05 15:04:08 -04:00
48fe97835b Add format_arg::operator bool 2016-10-02 09:36:40 -07:00
119a63ab72 internal::Arg -> format_arg 2016-10-02 09:29:11 -07:00
65a8c2c343 format_arg -> format_value 2016-10-02 08:49:10 -07:00
13b04044e5 Add format_args::size_type 2016-10-02 08:26:32 -07:00
cee50b7572 Fix compilation on Cygwin (#388) 2016-10-01 21:32:16 -07:00
8a77e7927e Enable C++11 in tests. 2016-10-01 07:18:55 -07:00
1e8553d679 Enable C++11 in tests. 2016-10-01 07:02:58 -07:00
06bab3edb0 Workaround mingw bug https://sourceforge.net/p/mingw/bugs/1531/ 2016-09-30 07:20:57 -07:00
f66d37fb1c Merge pull request #390 from chronoxor/master
Introduced NamedArgWithType<Char, T> : NamedArg<Char>
2016-09-29 08:11:46 -07:00
6fd6ecc10d Enable C++11 for no-windows-h-test 2016-09-28 07:45:28 -07:00
c4212f9ec2 format -> vformat 2016-09-28 07:09:26 -07:00
1546b9e336 Introduced NamedArgWithType<Char, T> : NamedArg<Char> 2016-09-28 00:18:09 +03:00
17c17d1585 Merge pull request #389 from chronoxor/master
Extend ArgLists to support serialization/deserialization in third-party components
2016-09-27 08:11:36 -07:00
d09dd1a81a Extend ArgLists to support serialization/deserialization in third-party components 2016-09-27 17:40:05 +03:00
21c6700b83 Don't build std branch with -std=c++0=98 2016-09-26 07:35:27 -07:00
64a0016680 Merge pull request #385 from jcelerier/master
Add FMT_OVERRIDE macro to allow specifying overriding functions
2016-09-25 07:44:37 -07:00
9ec3bea2d6 Add FMT_OVERRIDE macro to allow specifying overriding functions in c++11 compilers 2016-09-24 21:10:11 +02:00
1fb0586b06 Merge pull request #381 from hghwng/master
Fix compilation on Android.
2016-09-13 08:07:43 -07:00
5f26b5da28 Fix compilation on Android. 2016-09-13 10:34:54 +08:00
209a1d58bf Get rid of macros 2016-08-27 09:06:21 -07:00
9a07973261 Test types 2016-08-27 08:55:01 -07:00
0d25f6fcbb Move the paper to the docs repo 2016-08-27 08:26:47 -07:00
ea28a63706 Get rid of FMT_VARIADIC_CTOR 2016-08-27 08:23:44 -07:00
0d8aca8de3 Get rid of FMT_VARIADIC_VOID 2016-08-27 08:16:49 -07:00
4ece95a754 Make make_format_args public 2016-08-27 07:57:48 -07:00
0028ce57b6 Get rid of FMT_VARIADIC 2016-08-26 17:23:13 -07:00
ece7ae5f49 Make format_arg_store convertible to format_args 2016-08-26 15:09:40 -07:00
621447fece Make initialization C++11-compatible 2016-08-26 14:41:18 -07:00
a0190e4bbd Add a missing include 2016-08-26 10:26:33 -07:00
b903f5c123 format -> vformat 2016-08-26 09:10:23 -07:00
43c0095aa3 Refactor type mapping 2016-08-26 08:50:09 -07:00
4873685c7e ArgArray -> format_arg_store 2016-08-26 06:44:41 -07:00
fc73e10620 ArgList -> format_args 2016-08-25 08:50:07 -07:00
92605eb4f7 Remove FMT_USE_VARIADIC_TEMPLATES 2016-08-25 08:44:53 -07:00
9bb213e920 FormatError -> format_error 2016-08-25 08:38:07 -07:00
2ae6bca488 Complete syntax section 2016-08-25 07:23:04 -07:00
04335aeadb Correct syntax 2016-08-25 07:08:36 -07:00
3d5125cd87 Update paper 2016-08-25 06:50:09 -07:00
d775a20fff Update paper 2016-08-24 07:41:07 -07:00
4dc9fd995f Update paper 2016-08-24 06:55:18 -07:00
a79c7b4e8f Fix handling of unsigned char strings (#373) 2016-08-23 08:42:25 -07:00
195d6a5663 Update paper 2016-08-23 08:10:35 -07:00
6c184efa75 Remove old compatibility headers 2016-08-22 08:39:26 -07:00
93975c70bb Update paper 2016-08-21 07:50:31 -07:00
53f9e7f65c Add 'a' and 'A' format specifiers 2016-08-20 09:55:07 -07:00
768739c310 Update paper 2016-08-20 07:39:10 -07:00
94d387cd45 Update paper 2016-08-19 21:41:19 -07:00
721c9100f2 Update paper 2016-08-19 16:43:10 -07:00
108498bdd0 Add initial draft of the paper 2016-08-19 09:33:59 -07:00
f19d8f9655 Improve error reporting (#357) 2016-08-16 07:08:53 -07:00
2bf59a97c6 Add CUAUV, Seastar and ScyllaDB to the list of projects that use fmt 2016-08-10 08:29:44 -07:00
12a6027b40 Don't use -std compiler flag if CMAKE_CXX_STANDARD is specified (#366) 2016-08-05 08:22:45 -07:00
a5d0adf395 Use a heuristic to detect empty strftime result (#367) 2016-08-05 07:27:56 -07:00
1a23f9c274 Correct buffer growth when formatting time (#367) 2016-08-04 08:47:59 -07:00
9dbb60c4c8 Move fmt::fprintf to printf.h 2016-08-03 08:52:05 -07:00
ed30108918 Add "n" to integer formatting types 2016-07-26 07:36:35 -07:00
d5893c9a13 Update homepage and break long lines 2016-07-21 09:00:23 -07:00
6ee9f2ed09 Make printf argument formatters public (#335, #360) 2016-07-21 06:59:28 -07:00
631ffef438 Merge pull request #361 from nmoehrle/fix-unreachable-code
Remove unreachable code below FMT_THROW
2016-07-21 06:35:38 -07:00
355861f1ff Document PrintfFormatter::format 2016-07-20 08:26:14 -07:00
ab054532ce Move writer to PrintfFormatter object for consistency with BasicFormatter 2016-07-20 08:21:13 -07:00
9823675832 Break long lines 2016-07-20 08:17:33 -07:00
d4ddaaf2b1 Make PrintfFormatter public (#335, #360) 2016-07-20 08:09:14 -07:00
fa0f870ac9 Merge pull request #362 from smellman/smellman-patch-1
Update usage.rst: change Homebrew package name
2016-07-19 16:03:51 -07:00
1dbc6bd1fc Update usage.rst: change Homebrew package name 2016-07-20 07:34:21 +09:00
c8c9973669 Remove unreachable code below FMT_THROW 2016-07-19 20:33:55 +02:00
65cd664195 Fix handling of wide strings in StringWriter 2016-07-18 08:47:11 -07:00
c110c6eca7 Update readme 2016-07-16 08:44:27 -07:00
1acfd07f1e Workaround broken MinGW installation on AppVeyor (#355) 2016-07-16 08:00:53 -07:00
d4885cea62 Document BasicStringWriter 2016-07-16 08:00:53 -07:00
903357c853 Break a long line 2016-07-16 08:00:53 -07:00
88b84d6429 Merge pull request #358 from arvedarved/fix-freebsd
Fix compile on FreeBSD
2016-07-15 15:23:51 -07:00
d7c4e1cb1f Fix compile on freebsd 2016-07-15 14:28:18 +02:00
0d5ef5c2a6 Fix inclusion of printf.h in the header-only config (#354) 2016-07-12 06:59:35 -07:00
8631694021 check -> const_check to avoid a conflict with AssertMacros.h (#350) 2016-07-12 06:40:23 -07:00
4133e501f3 Merge branch 'locale' 2016-07-11 06:48:38 -07:00
0e6df7e511 Fix handling of thousands separator (#353) 2016-07-11 06:31:23 -07:00
44c926d96f Merge pull request #348 from LogicalKnight/fix-clang-extern-header-only
Fix building with clang in header-only mode
2016-06-27 09:21:16 -07:00
75f862bf57 Fix building with clang in header-only mode
Building under a recent clang compiler causes the use of an extern
template for the BasicData struct. However, the only instantiation of
that structure in format.cc is only done if FMT_HEADER_ONLY is not
defined. This causes the build to fail in C++11 or C++14 mode.
Therefore, only declare the BasicData template as extern if
FMT_HEADER_ONLY is not defined.
2016-06-25 05:22:07 +00:00
116914a949 Remove unused scripts 2016-06-22 20:58:19 -07:00
689fd2ad49 Refactor release script 2016-06-22 07:58:35 -07:00
7a0806a366 Fix release script 2016-06-22 07:29:34 -07:00
a81bff9349 Update documentation build instructions 2016-06-22 07:18:37 -07:00
5c876088d3 Reduce noise 2016-06-22 06:33:56 -07:00
d688072990 Break a long line 2016-06-22 06:29:18 -07:00
aa1e6b0f75 Handle images in rst2md converter 2016-06-22 06:28:51 -07:00
26819461bd Fix links in older docs 2016-06-17 07:30:42 -07:00
2e69e454d0 Fix a link (#347) 2016-06-16 11:18:40 -07:00
a914384bc4 Merge update-website and release scripts 2016-06-16 07:53:07 -07:00
41356aa00a Format scripts 2016-06-15 16:15:34 -07:00
e9a0d3141b Merge branch 'locale' 2016-06-15 15:04:24 -07:00
c7d0241abb Fix docs 2016-06-15 07:16:04 -07:00
e0d6f630f8 Fix MSVC warnings 2016-06-15 06:29:47 -07:00
a201c61977 Suppress -Wpadded warnings 2016-06-14 22:17:34 -07:00
4569b4dbd6 Fix -Wpessimizing-move 2016-06-14 15:53:40 -07:00
c9bb5468b6 Fix clang warning 2016-06-14 15:42:32 -07:00
b26e76efe9 Fix a -Wweak-vtables warning in clang 2016-06-14 08:54:08 -07:00
c7739536e8 Don't use strtod_l on Android (#345) 2016-06-14 06:57:12 -07:00
dfa631e64a Bump version 2016-06-14 06:33:57 -07:00
18e3f16576 Suppress clang's documentation warnings 2016-06-12 09:09:36 -07:00
72d51e0b1e Implemented #335: custom printf support 2016-06-09 08:41:56 -07:00
6ccb5673c4 Update README.rst 2016-06-03 08:40:07 -07:00
a82026746d Fix download link 2016-06-03 08:19:24 -07:00
9d36a5a3b0 Remove .doctrees 2016-06-03 08:11:24 -07:00
81e2dac955 Improve documentation build 2016-06-03 07:19:05 -07:00
5940431e2d Don't exclude the current version from dropdown menu 2016-06-03 06:23:49 -07:00
15008bf05d Generate docs for all versions 2016-06-02 08:47:33 -07:00
06045cb4a5 Minor fixes to documentation build scripts 2016-06-02 06:52:07 -07:00
9492b9ff03 Pass versions from CMake to Sphinx 2016-06-02 06:41:25 -07:00
0d9870dd9e Implement website update script 2016-06-01 07:45:54 -07:00
5e70843a73 Don't fail if a package was not found 2016-05-31 08:49:34 -07:00
d25e07660e Specify minimum required Breathe version 2016-05-31 08:46:28 -07:00
579736f210 Don't install Sphinx if it the minimum version is satisfied 2016-05-31 08:40:29 -07:00
8650c57ccd Reuse virtualenv to speed up builds 2016-05-26 08:00:41 -07:00
9071daebe9 Make work dir configurable 2016-05-26 07:35:10 -07:00
fcaf8a0cdc Make virtualenv dir configurable and break long lines 2016-05-26 06:52:51 -07:00
231c16df25 Break long lines 2016-05-26 06:48:12 -07:00
971359997f Implement website update script 2016-05-26 06:44:20 -07:00
f7abf9fd0f Implement website update script 2016-05-25 08:22:40 -07:00
e68836c123 Don't use --upgrade because it causes pip install older version of sphinx 2016-05-25 07:46:47 -07:00
dc1e36fa0e Make documentation installation optional (#333) 2016-05-24 07:03:08 -07:00
7bb1b50835 Update sphinx 2016-05-24 06:55:57 -07:00
96c28f748d Detect if lconv contains thousands_sep 2016-05-23 07:41:22 -07:00
e160c2b79a Add fmt prefix to includes (#332)
Technically it is not necessary, but prevents errors when people add the
fmt directory itself rather than its parent to includes.
2016-05-22 16:42:44 -07:00
e2a332e5df Use a mock to test locale support 2016-05-19 17:38:44 -07:00
ebff26f8f1 Improve formatting consistency 2016-05-19 13:36:00 -07:00
559739ec1d Merge pull request #328 from dpantele/android-fix
Workaround for missing lconv support in android
2016-05-19 13:31:38 -07:00
45a1509455 Workaround for missing lconv support in android (#327) 2016-05-19 13:29:21 -04:00
5b106083e7 Check if setlocale succeeded 2016-05-19 06:48:35 -07:00
2d8a7ed086 Add include to example 2016-05-19 06:39:03 -07:00
b18f783fed Add string.h to the docs 2016-05-18 21:04:34 -07:00
b6c0cf9683 Add fmt::to_string (#326) 2016-05-18 19:54:52 -07:00
d00b43c592 Workaround an issue with "delete this" in GMock and gcc 6.1.1 2016-05-14 17:58:14 -07:00
cc9b051d12 Move format_system_error to the public API (#323) 2016-05-13 07:19:39 -06:00
d67eb8af2f Correct docs 2016-05-10 11:07:53 -07:00
3400e0d609 Fix clang -Weverything warnings (#250) 2016-05-10 08:50:42 -07:00
f76583276a Clarify performance tradeoffs (#320) 2016-05-10 07:29:31 -07:00
31a4f0ab05 Implement website update script 2016-05-09 08:36:16 -07:00
744c2824c5 Fix a clang warning about an undefined template (#318) 2016-05-08 09:45:32 -07:00
140f11190b Add a website update script 2016-05-08 08:03:01 -07:00
fb67a2f660 Fix building source package 2016-05-08 07:28:34 -07:00
d2b65f77e8 Fix formatting 2016-05-08 07:27:41 -07:00
03cdd4ca50 Ignore virtualenv in subdirectories 2016-05-08 07:27:20 -07:00
e5e4fb370c Update version 2016-05-07 09:50:47 -07:00
70d93078e3 Update links 2016-05-07 09:37:38 -07:00
b344bd9582 Fix release script and changelog format 2016-05-07 09:21:26 -07:00
add6bcca3e Document ostream support 2016-05-07 09:09:33 -07:00
836415b215 Update changelog 2016-05-07 08:59:19 -07:00
7ce503e6a0 Update changelog 2016-05-07 08:50:51 -07:00
a4538ac1e8 Update ChangeLog.rst 2016-05-07 08:44:51 -07:00
6dfdada493 Update ChangeLog.rst 2016-05-07 08:00:12 -07:00
b7fe7dfad1 Update changelog 2016-05-07 07:50:56 -07:00
9c865560fd Fix a warning 2016-05-07 07:10:40 -07:00
1788883262 Fix warnings 2016-05-07 07:03:21 -07:00
90730e706b Move ostream support to ostream.{h,cc} 2016-05-06 07:37:20 -07:00
041725e9d0 Update changelog 2016-05-05 08:20:12 -07:00
c5fe3eb87e Fix code bloat regression on gcc 5.3.1 with -std=c++11 (#315) 2016-05-05 07:48:06 -07:00
b2a8141373 Update changelog 2016-05-04 08:49:29 -07:00
408c84cd42 Update copyright (#314) 2016-05-04 06:27:03 -07:00
6825ac9ccf Merge pull request #313 from dean0x7d/test-fixes
Fix a few bugs related to compile tests
2016-05-04 06:22:17 -07:00
f3d6d3a8f2 Fix find-package-test failure with non-default compiler
The failure would happen when the main project was configured with
a compiler which is not the system default. The new configuration
was not forwarded to "ctest --build-and-test". This fixes it.
2016-05-04 00:51:28 +02:00
8eaad79de7 Fix FMT_STATIC_ASSERT compile test
FMT_STATIC_ASSERT is defined in posix.h so expect_compile_error was
actually failing on a missing macro instead of the static assert.
2016-05-04 00:36:48 +02:00
131d446183 Fix compile tests not clearing the cache after an error
The cache bug meant that a failed test would appear forever broken,
even if the proper fix was applied.
2016-05-04 00:36:11 +02:00
4042198262 Merge pull request #312 from dean0x7d/intel-udl-fix
Fix user-defined literal detection for Intel C++ compiler (#311)
2016-05-03 08:34:53 -07:00
729491eab7 Use FMT_ICC_VERSION everywhere internally 2016-05-03 14:26:01 +02:00
3a04ebf14f Fix user-defined literal detection for Intel C++ compiler 2016-05-03 13:43:51 +02:00
b64d13a357 Merge pull request #309 from jwilk/spelling
Fix typos
2016-05-01 06:48:34 -07:00
e0ac51cbd9 Fix typos 2016-05-01 12:29:21 +02:00
4e279e2a70 Correct formatting 2016-04-29 07:02:37 -07:00
a3929b719a Document date/time formatting and move example to the docs 2016-04-29 06:40:31 -07:00
63be22d5dc Update template 2016-04-28 07:09:05 -07:00
f171d1f3d6 Update a link 2016-04-28 07:05:28 -07:00
c33f3e281b cppformat -> fmt 2016-04-28 07:00:22 -07:00
59d0efd6d6 Update links 2016-04-28 06:54:37 -07:00
56b6c05bf9 Update links 2016-04-28 06:47:43 -07:00
8dd48923d8 Update links 2016-04-28 06:45:50 -07:00
7dac3c44f5 Update links 2016-04-27 18:26:23 -07:00
4a0d9dbc30 Update build script 2016-04-27 18:22:44 -07:00
c916ab3319 Update docs 2016-04-27 08:35:59 -07:00
f9ee5f4b43 Update README.rst 2016-04-27 08:28:24 -07:00
e817bb9cc4 Update links 2016-04-27 08:23:03 -07:00
5946029585 Update README.rst 2016-04-27 08:15:49 -07:00
f4b5aeaed2 Update README.rst 2016-04-27 08:13:56 -07:00
5a6a58576a Update README.rst 2016-04-27 08:05:40 -07:00
90accff030 Fix a warning 2016-04-26 07:23:03 -07:00
49f6771ca9 Grow buffer 2016-04-25 08:24:14 -07:00
fa5ebd27d4 Implement time formatting 2016-04-25 08:07:27 -07:00
4cddbfa7cf Update README.rst 2016-04-25 06:36:26 -07:00
f1cd5413e9 Update README.rst 2016-04-24 10:46:21 -07:00
7f0d8184c9 cppformat -> fmt 2016-04-24 10:39:33 -07:00
e569297d6a Update Android config 2016-04-24 10:23:02 -07:00
bea282dae9 cppformat -> fmt 2016-04-24 09:18:15 -07:00
17544b1824 Add compatibility headers 2016-04-24 09:10:58 -07:00
afd67497de cppformat -> fmt 2016-04-24 09:06:12 -07:00
5e1576f79f cppformat -> fmt 2016-04-24 08:17:47 -07:00
848ab63a2a CPPFORMAT_VERSION -> FMT_VERSION 2016-04-24 07:16:33 -07:00
c7d9d79ad2 Document visitors and formatters 2016-04-21 07:31:32 -07:00
9ae2ac2fb7 Document ArgVisitor 2016-04-21 06:59:48 -07:00
125bb0f19a Revise docs 2016-04-21 06:50:54 -07:00
bfdca8b576 Make ArgVisitor public and document it
Also remove unnecessary namespace qualification.
2016-04-20 09:11:33 -07:00
da3467b7f9 Document BasicArgFormatter 2016-04-20 07:45:11 -07:00
fb5350543c Correct case 2016-04-20 07:44:37 -07:00
ccbc891992 Document argument formatters 2016-04-20 07:16:52 -07:00
b69e6dcead Make BasicArgFormatter public and add ArgFormatter
This allows providing custom argument formatters without relying on
internal APIs (#235).
2016-04-19 08:56:31 -07:00
4d8cee2d48 Document the n format specifier 2016-04-17 20:46:08 -07:00
f68771abe4 Implement locale-specific integer formatting 2016-04-17 19:06:03 -07:00
581afee039 Enable wstring in gtest (#304) 2016-04-13 08:26:42 -04:00
e49a4e0aff Bump version and adjust comments 2016-04-12 07:42:47 -04:00
753e9a04c0 Update version 2016-04-11 20:02:42 -04:00
18c69c998d Update changelog and version 2016-04-11 19:59:22 -04:00
6cfe43539a Update version 2016-04-11 19:59:01 -04:00
c61043450b Update changelog 2016-04-11 19:57:39 -04:00
e4f7d0d311 Resolve overloads 2016-04-11 09:32:24 -04:00
d8e246daaf Merge pull request #299 from niosHD/minor-packaging-improvements
Minor packaging improvements
2016-04-07 07:35:09 -07:00
620f999e80 ignore the current build directory when packaging
This makes sure that the current build directory is not packaged
with the regular source tree when `make package_source` is used.
2016-04-06 09:49:34 +02:00
dcbb6b1e4d make the install location for the generated cmake files configurable
By default the cmake files are installed to "<prefix>/lib/cmake/cppformat".
This can now be customized using the `FMT_CMAKE_DIR` cache variable.
Valid paths are documented in the cmake manual [1].

e.g., install the cmake files to "<prefix>/share/cmake/cppformat"
```
cmake -DFMT_CMAKE_DIR=share/cmake/cppformat <path-to-source>
```

Tip: Try `make package` to examine the result.

[1] https://cmake.org/cmake/help/v3.0/command/find_package.html
2016-04-06 09:33:13 +02:00
a99891e7a5 Use a mock to test custom argument formatter 2016-03-19 07:36:28 -07:00
52f89065e1 Make argument formatter customizable 2016-03-19 07:20:31 -07:00
9ffe98c00e Fix/suppress MSVC warnings 2016-03-19 06:39:33 -07:00
63d7f3d116 Don't check for C++11 features if C++11 support is disabled 2016-03-18 08:10:06 -07:00
c052cf11b9 Improve coding style consistency 2016-03-18 07:59:04 -07:00
0c901efb16 Use less strict pedantic flags for tests because of GMock (#291) 2016-03-18 07:52:24 -07:00
030cccfeef Update changelog 2016-03-17 07:28:21 -07:00
062e3bd757 Add a branch option to the release script 2016-03-13 10:27:15 -07:00
5174b8ca28 Update README.rst 2016-03-10 10:52:21 -08:00
090de29ddf Update README.rst 2016-03-10 10:51:52 -08:00
59607f5e99 Fix warnings on GCC 4.6.3 2016-03-09 07:47:08 -08:00
763d1fe6a3 Suppress warnings in Google Mock 2016-03-08 07:36:22 -08:00
7d6622942c Break a long line 2016-03-08 06:55:41 -08:00
0867c1b447 Test writing to ostream 2016-03-08 06:47:53 -08:00
6883d6e724 Merge pull request #285 from mwinterb/winerror_winu
Changed format_windows_error to not need LocalFree
2016-03-06 06:55:37 -08:00
8f4b8edb8b Added test of error code that forces the insufficient buffer code path. 2016-03-04 17:47:37 -08:00
5324d385c0 Fix a MSVC warning 2016-03-04 06:44:12 -08:00
fc505b5447 Merge pull request #286 from Naios/master
Define FMT_NOEXCEPT empty when exceptions are disabled
2016-03-03 09:54:27 -08:00
3c3d6b3d2a Define FMT_NOEXCEPT empty when exceptions are disabled
* Fixes warnings about disabled exception support in MSVC
2016-03-03 17:23:25 +01:00
2a05a87fe7 Changed format_windows_error to not need LocalFree
This is for non-'Desktop' applications that have a
more limited collection of functions.
2016-03-02 17:35:34 -08:00
3ecad55910 Fix sign conversion warnings 2016-03-02 07:53:14 -08:00
d929fdeb9b Fix clang warnings 2016-03-02 07:02:57 -08:00
9d577cae6f Fix handling of negative error codes in format_error_code 2016-03-02 07:01:21 -08:00
6e820841d4 Add mongo_smasher to the list of projects 2016-03-01 14:28:52 -08:00
82d6813e7c Fix a bunch of Clang sign-conversion warnings 2016-03-01 08:12:29 -08:00
2f12a32c20 Merge pull request #277 from PSPDFKit-labs/fix-switch-fallthrough
Fix switch fall-through warning
2016-02-23 10:28:17 -08:00
6178bc6f8e Fix switch fall-through warning
Clang with `-Wimplicit-fallthrough` enabled shows a warning here without
the break.
2016-02-23 12:59:26 -05:00
209748f128 Workaround a bug in Apple LLVM version 4.2 of clang (#276) 2016-02-23 07:27:01 -08:00
f64ea6235f Include xlocale.h for LC_NUMERIC_MASK on OS X 2016-02-19 13:30:18 -08:00
80d288b146 Correct comment 2016-02-11 07:25:00 -08:00
6500f161f7 Fix a warning in freelocale mock (#274) 2016-02-11 06:55:53 -08:00
abd93d824a Move gmock into test/ 2016-02-10 07:16:49 -08:00
2b2aa8926f add_subdirectory-test -> add-subdirectory-test for consistency 2016-02-10 07:01:40 -08:00
21b8279cfe Remove biicode because it has been shut down 2016-02-09 21:25:52 -08:00
cd7f6c1fda Comment 2016-02-09 15:40:26 -08:00
70e44a8e7f Simplify locale mock 2016-02-09 11:31:04 -08:00
b8c6192a61 Simplify build config and enable C++11 by default 2016-02-09 08:43:39 -08:00
c7b7141b11 Merge pull request #273 from niosHD/extend-ci-tests
Extend CI tests with older c++ standards
2016-02-09 06:53:58 -08:00
c57f8f563b omit the c++ 2003 tests 2016-02-09 09:08:11 +01:00
016af73d19 fixed typo in script 2016-02-07 18:47:39 +01:00
f961683516 specify c++11 as c++0x for travis 2016-02-07 18:41:46 +01:00
27a1b787c8 test in c++ 98, 03 and 11 mode 2016-02-07 18:32:23 +01:00
6a79a3279b build and test in c++11 and in c++98 mode 2016-02-07 18:23:02 +01:00
734d3bf175 Remove link to API compatibility report which is no longer functional 2016-02-05 08:31:19 -08:00
8c8877df5a treat format.cc like a header
Given that it is required for header only builds it has to be
installed too.
2016-02-05 15:27:49 +01:00
754be04f11 state that sudo is required for CI
This informs travis that the container-based build environment can
not be used.
2016-02-05 14:33:56 +01:00
1adee75e1c Check if -fno-delete-null-pointer-checks flag is supported 2016-02-04 08:36:41 -08:00
a4b611a3d3 Workaround GTest bug 705 (#268) 2016-02-04 08:15:19 -08:00
220bb764e5 Use quotes for local includes 2016-02-04 08:08:33 -08:00
a750114a38 Merge pull request #271 from newnon/master
fix android build
2016-02-04 06:14:24 -08:00
4d56c5ce4c fix android build 2016-02-04 12:46:59 +03:00
c0ad9a888b Update the source location in the documentation build script 2016-02-03 09:28:44 -08:00
0598d84f61 Merge pull request #267 from niosHD/update-project-layout
Update project layout
2016-02-03 08:48:25 -08:00
b09c83504e test for gnu++98 instead for c++98 because of mingw ... 2016-02-03 14:11:30 +01:00
3133925ab2 Merge branch 'master' into update-project-layout
Conflicts:
	posix.h
2016-02-03 13:15:26 +01:00
03b9485cb3 perform the slower tests only in PEDANTIC mode 2016-02-03 13:05:18 +01:00
ded46cc1b6 build test-main library again to improve build time 2016-02-03 12:59:03 +01:00
c1a4cd0fa7 check if cppformat is the master project or just used as dependency
Based on that information less intrusive option defaults are choosen.
Additionally, packaging support is omitted.
2016-02-03 11:20:19 +01:00
797d72133e restored smoke test for syntax compatibility with the 98 c++ standard 2016-02-03 10:01:53 +01:00
56cfd9f4ce installed posix.h too when it is built into the library 2016-02-03 09:59:55 +01:00
e0e8f717a0 FMT_USE_FILE_DESCRIPTORS is apparently only needed for the tests 2016-02-03 09:14:32 +01:00
cfb25b0e80 Use typedefs instead of macros 2016-02-02 22:06:54 -08:00
e489f879c3 Add locale tests 2016-02-02 17:21:09 -08:00
c0e926109e use the same warning options like before the PR
Additional notes on how to improve the current state have been added.
2016-02-02 17:14:51 +01:00
b05a02b91c remove comment which is now superfluous since the code has been moved 2016-02-02 17:04:12 +01:00
d411aa165e use quotes for including cppformat headers from the tests 2016-02-02 16:58:41 +01:00
be961bae0f fixed typo in python script 2016-02-01 10:41:45 +01:00
0a4acc9656 use the cmake and ctest to drive the appveyor build 2016-02-01 10:22:47 +01:00
d3fe82c55b propagate the build type into the find test 2016-01-31 20:17:39 +01:00
a659d8079e Merge branch 'master' into update-project-layout 2016-01-31 17:00:05 +01:00
00fda9b25a add a test for the find script on the build directory 2016-01-31 00:02:49 +01:00
4aeeb49d23 updated compile-test and include a working test
This makes sure that the test does not break due to other reasons.
2016-01-30 23:49:39 +01:00
fee52f79b8 update the includes in the tests to get rid of the deprecated warnings 2016-01-30 22:33:37 +01:00
4952e79e45 Document that floating-point formatting is locale-dependent. 2016-01-30 09:20:43 -08:00
95c0fb5075 Add a "C" numeric locale 2016-01-29 16:29:46 -08:00
62ac1d98a4 export the header only library also during installation 2016-01-29 16:57:45 +01:00
5aa5116edc moved the library definition and the installation into a sub CMakeLists.txt 2016-01-29 16:39:03 +01:00
5e7ab2f4ea major cleanup of the test folders CMakeLists.txt
The new code does not rely on globally defined include directories
anymore. Additionally a lot of conditional code and has been removed
which improves readability a lot.
2016-01-29 16:21:17 +01:00
b52d0bd9d4 define cppformat cmake targets with proper interface definitions 2016-01-29 13:23:08 +01:00
0fb474be3a outlined the compiler feature tests to improve script readability 2016-01-29 13:03:47 +01:00
3019a8c1fd moved code into cppformat subdirectory
Proxy headers have been placed into the project root to emit
deprecation warnings.
2016-01-29 12:49:35 +01:00
7ee287d3d9 Sign extend arguments of smaller types passed to %ll? (#265) 2016-01-27 07:03:19 -08:00
ae6368c985 Add a comment to clarify why convert to unsigned 2016-01-26 07:13:34 -08:00
bb7a80b1ab Correct comment 2016-01-25 06:46:43 -08:00
8474a6232d Don't perform narrowing conversion for integers in printf (#255) 2016-01-24 00:43:42 +01:00
22f61140d1 Format CMake files, ignore generated files and don't copy header 2016-01-13 07:14:32 -08:00
52ee516cf3 Merge pull request #264 from niosHD/improve-find-and-package-support
Improve find and package support
2016-01-13 06:37:41 -08:00
ef7bbfff87 removed workaround for cmake versions prior to 2.8.10 2016-01-13 09:54:02 +01:00
891e9117f6 trying to update cmake to 2.8.12 in travis via a ppa repo
Whitelist of repos:
https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json

Whitelist of packages:
https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
2016-01-12 16:57:40 +01:00
3fc3ecd184 reverted removal of CPACK_SOURCE_PACKAGE_FILE_NAME
The use of `CPACK_PACKAGE_NAME` leads to
`cppformat-<version>-Source.zip` as the name for the source package
which is different from the expected `cppformat-<version>.zip`.
2016-01-12 16:48:53 +01:00
06f3abe26d Return early from ArgMap::find 2016-01-12 06:37:39 -08:00
50f14f225c Merge pull request #262 from mwinterb/argmap_vector
Changed ArgMap to be backed by a vector instead of a map.
2016-01-12 06:23:19 -08:00
b732455fd3 enable package support for out of source builds 2016-01-12 12:52:05 +01:00
daf74ae0b1 upgrades to cmake 2.8.12 and adds config and export support
This commit upgrades cmake to 2.8.12 to implement proper cmake
`find_package` support using config and export file generation.
Having this support enables users to use installed cppformat
with a simple `find_package` call. Directly using a version
from a build directory is also supported.

main.cpp:
```
 #include <cppformat/format.h>
int main(int argc, char** argv)
{
  for(int i = 0; i < argc; ++i)
    fmt::print("{}: {}\n",i,argv[i]);
  return 0;
}

```

CMakeLists.txt:
```
cmake_minimum_required(VERSION 2.8.12)

project(cppformat-test)

find_package(cppformat REQUIRED)

add_executable(cppformat-test "main.cpp")
target_link_libraries(cppformat-test cppformat)

```
Configuring when cppformat is installed under `CMAKE_INSTALL_PREFIX`: `cmake <PATH_TO_TEST_SRC>`

Configuring when cppformat is installed `ELSEWHERE`: `cmake -Dcppformat_DIR=<ELSEWHERE>/lib/cmake/cppformat <PATH_TO_TEST_SRC>`

Configuring when cppformat is only built: `cmake -Dcppformat_DIR=<cppformat_BUILD_DIR> <PATH_TO_TEST_SRC>`
2016-01-12 12:47:19 +01:00
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
97e9ed11bc Set interface include dir for gmock 2016-01-09 08:07:31 -08:00
f55bf55d43 Correct comment 2016-01-09 08:06:59 -08:00
e604d5347f Fix links in README (#260) 2016-01-08 13:03:34 -08:00
979e70f10d Merge pull request #259 from mwinterb/unknown_pragma_bsr
Fixed unknown pragma warnings for _BitScanReverse.
2016-01-08 07:25:48 -08:00
b203beb61d Don't define the MSVC clz functions unless __builtin_clzll is unavailable.
This is mainly just to avoid including intrin.h unnecessarily.
2016-01-07 15:38:08 -08:00
28a303ddd4 Fixed unknown pragma warnings for _BitScanReverse.
Changed to only define the MSVC implementations for clz and clzll if the builtins are not available to avoid warnings about an unknown #pragma for "intrinsic".
2016-01-06 14:42:27 -08:00
3943803412 Merge pull request #256 from mwinterb/clang_ms_clz
Fixed macro redefinition warnings when compiling with clang-cl.
2016-01-06 06:46:17 -08:00
7185e96da1 Fixed issues with MSVC emulations of clz and clzll.
Both clang-cl and Clang/C2 #define _MSC_VER but also have support for __builtin_clz and __builtin_clzll, leading to duplicate macro definition warnings. Emulation of clz using _BitScanReverse is suppressed if the builtins are already available.

Additionally, the value of the output parameter of _BitScanReverse is undefined if the input value is 0, which is avoided by construction, so the code analysis warning for using uninitialized data is now suppressed.
2016-01-05 16:03:06 -08:00
251a0869be Fixed macro redefinition warnings when compiling with clang-cl.
Both clang-cl and Clang/C2 #define _MSC_VER but also have support for __builtin_clz and __builtin_clzll, leading to duplicate macro definition warnings. This change suppresses emulation of clz using _BitScanReverse if the __clang__ macro is defined.
2016-01-01 18:07:06 -08:00
804ad8f4df Document std::ostream overload of fprintf 2015-12-24 07:00:22 -08:00
8b0504825d Merge branch 'master' of github.com:cppformat/cppformat 2015-12-24 06:58:05 -08:00
77d3761b50 Enable macro expansion in Doxygen (fixes #248) 2015-12-24 06:54:37 -08:00
0525a03a69 Merge pull request #251 from nickhutchinson/work/fprintf-streams
Add fprintf overload that writes to a std::ostream
2015-12-23 06:58:44 -08:00
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
4797ca025e POD -> trivially copyable/constructible 2015-12-20 07:29:59 -08:00
3121ebd044 Merge pull request #249 from dean0x7d/variadic-v3
Reduce compile time of variadic functions (2)
2015-12-20 07:10:00 -08:00
b098306839 Replace template recursion with array initialization 2015-12-19 18:19:18 +01:00
a721319e3a Add MakeArg constructor for Arg 2015-12-19 18:19:18 +01:00
29726cefb8 Remove extra '*'s 2015-12-18 07:30:03 -08:00
811964502d Add BasicFormatter's members to the docs 2015-12-18 07:24:25 -08:00
0629d76bb0 Fallback to sized integer types on MSVC if stdint.h is not available 2015-12-18 07:20:05 -08:00
016714c57b Add BasicFormatter to the docs 2015-12-18 07:16:40 -08:00
c679352517 Define FMT_API to nothing for Doxygen 2015-12-18 07:13:43 -08:00
1042ddda0f Document BasicFormatter 2015-12-18 07:07:41 -08:00
d998b5d038 Add version 2.0.0 to the dropdown menu 2015-12-18 06:47:37 -08:00
bf6651d1ca Add github-btn style 2015-12-17 07:59:09 -08:00
1cba0aea27 Simplify CMake config and do minor adjustments
for consistency with used coding conventions.
2015-12-10 07:24:23 -08:00
a9d2e826fe Merge pull request #245 from macdems/master
Declarations for shared library in Windows.
2015-12-10 07:05:33 -08:00
c47318afa8 Declarations for shared library in Windows.
Added __declspec(dllimport) and __declspec(dllexport) declarations
when compiled in Windows.
2015-12-10 13:36:18 +01:00
ecd52bc610 Fix for a bogus MSVC warning (#244) 2015-12-09 08:57:29 -08:00
5c76d107cb Fix MSVC build 2015-12-06 14:17:34 -08:00
98c1f76f24 Replace uninitialized_copy with memmove (#242)
because the memory areas may overlap.
2015-12-06 07:44:07 -08:00
e7f4566dd4 Replace <algorithm> with <memory>
~20% faster compile time on bloat-test
2015-12-04 22:57:36 -08:00
e0179ee190 Fix a warning and remove extra newline 2015-12-04 17:52:36 -08:00
e567fe6960 Replace "!!" with "!= 0" for readability 2015-12-04 17:52:06 -08:00
7c60db1e24 Fix a warning 2015-12-04 14:12:42 -08:00
0ea73df717 Merge branch 'custom-formatter' 2015-12-04 07:24:09 -08:00
aa7bb101ed Undefine fileno if defined in posix-test 2015-12-03 20:17:04 -08:00
3bc97a5564 Merge pull request #241 from Gachapen/fix_fileno
Fix fileno causing compile error when #defined
2015-12-03 20:15:10 -08:00
c2ffa14684 Fix fileno causing compile error when #defined
Error:
expected unqualified-id before '(' token
 int fmt::BufferedFile::fileno() const {

This is an issue with Android NDK and mingw32.
2015-12-03 23:21:42 +01:00
535dbdd1c8 Move formatter methods to the header
and improve naming consistency
2015-12-03 09:38:06 -08:00
00d56e06ef Bump version 2015-12-03 08:15:03 -08:00
7e94fcb680 Reapply accidentally reverted changes by ReadmeCritic 2015-12-03 08:09:53 -08:00
6ced4230f4 Initial support for custom formatters 2015-12-02 08:41:05 -08:00
5f8af5ef1d Update version 2015-12-01 07:33:30 -08:00
5837851cb2 Update docs 2015-12-01 07:31:15 -08:00
abe932164a Update changelog 2015-12-01 07:20:33 -08:00
19de4a863a Merge pull request #236 from Jopie64/master
Silence some performance warnings in Visual Studio
2015-12-01 06:58:09 -08:00
328c8888ec Make compilable under Visual Studio 2008
Older Visual Studio versions are not shipped with stdint.h
2015-12-01 09:34:13 +01:00
df2dfd9612 Silence some performance warnings in Visual Studio 2015-12-01 08:59:59 +01:00
fac207816c Update release script 2015-11-30 08:23:16 -08:00
ec80a1ab51 Update changelog 2015-11-30 08:22:03 -08:00
3bf900e301 Update changelog 2015-11-30 08:17:47 -08:00
722c8e4ae6 Update changelog 2015-11-30 08:10:49 -08:00
13d6b2d38c Update changelog 2015-11-30 07:22:51 -08:00
b8bd80ff28 Fix handling of empty non-null-terminated strings 2015-11-25 09:49:01 -08:00
7cbb29f61e Make FormatBuf::size() const 2015-11-25 08:27:46 -08:00
053df632f8 Minor simplification and adjustment of coding style for consistency
in custom stream buffer implementation:

* basic_formatbuf -> internal::FormatBuf
* remove unused Traits template argument
2015-11-25 08:00:57 -08:00
222f2d28f5 Fix MSVC warnings 2015-11-25 07:47:43 -08:00
f60c4b9947 Fix an MSVC warning (#234) 2015-11-25 07:17:05 -08:00
0519737b95 Don't use _ecvt (#233) 2015-11-25 07:11:28 -08:00
9a08fb52bf Fix compilation with clang and old libstdc++ 2015-11-24 09:13:48 -08:00
8265263c5d Remove unnecessary stuff. 2015-11-24 09:09:09 -08:00
d266adf805 Implement custom stream buffer (#92) 2015-11-24 09:06:33 -08:00
6cff6d8137 Use overloaded operator<< for enums if available (#232) 2015-11-24 08:18:19 -08:00
1a2a333a1a Use format specifiers when formatting null pointers & strings 2015-11-23 21:01:28 -08:00
289885e8c0 Fix branch detection on Travis 2015-11-23 08:47:46 -08:00
4118b89139 Get rid of the html directory when installing docs 2015-11-23 08:22:21 -08:00
96731cebe1 Print branch name 2015-11-23 08:21:22 -08:00
b83fd00183 Pass version from CMake to Sphinx 2015-11-23 08:10:02 -08:00
646829e34d Fix MSVC warnings 2015-11-21 07:31:00 -08:00
8beadace37 Improve detection of isinf, isnan and getsign 2015-11-21 07:20:18 -08:00
223575b567 Tyop 2015-11-20 08:28:29 -08:00
ee3e68dc16 Improve compatibility with bcc32 2015-11-20 08:14:10 -08:00
e5d599875c Improve compatibility with bcc32 2015-11-20 07:56:16 -08:00
b53994fd0d Suppress a warning 2015-11-20 07:49:29 -08:00
fd1753484e Fix example 2015-11-19 07:23:43 -08:00
6606971aae Improve compatibility with bcc32 2015-11-18 08:42:09 -08:00
31aced8b59 Improve compatibility with bcc32 2015-11-18 08:04:04 -08:00
1dd5e035eb Simplify signbit 2015-11-18 07:38:05 -08:00
0219d5591b Improve compatibility with bcc32 2015-11-17 08:53:15 -08:00
3a2f91bd58 Fallback to ecvt if _ecvt_s is not available. 2015-11-17 08:35:30 -08:00
c1a8dfe555 Improve detection of signbit 2015-11-17 07:40:22 -08:00
d9e0f5c04e Merge pull request #229 from LogicalKnight/fix_intel_warning
Fix warning when using Intel C++ on OS X
2015-11-13 16:48:34 -08:00
9c03176e6b Fix util-test 2015-11-13 15:16:10 -08:00
2157375d5c Use textual formatting for bool with %s specifier in printf (#224) 2015-11-13 07:18:44 -08:00
7dcf05108e Move cstddef include to format.cc and refactor Buffer::append 2015-11-13 06:52:13 -08:00
32f0295460 Fix warning when using Intel C++ on OS X
Unfortunately, Intel's C++ compiler defines `__clang__` which means that
some of the pragmas in use that Intel C++ doesn't use will cause
warnings to be generated.
2015-11-13 08:01:59 -05:00
3df9bf3a91 Merge pull request #228 from dean0x7d/fix_warning
Fix static_assert feature detection on clang
2015-11-12 12:38:27 -08:00
7d94b5bbeb Fix static_assert feature detection on clang 2015-11-12 21:03:08 +01:00
ef5e5e02b4 Only update docs from master branch on travis 2015-11-12 08:47:07 -08:00
11f946efff Make release script create a GitHub release 2015-11-12 07:39:09 -08:00
57ba9436a0 Format null string as (nil) with p specifier 2015-11-12 06:09:08 -08:00
5e37698911 Implement release script 2015-11-11 08:41:29 -08:00
b5fda1c90d Format null pointer as (nil) and null string as (null) in printf (#226) 2015-11-11 07:57:19 -08:00
e61c8d4cba Update documentation config 2015-11-11 07:35:31 -08:00
89cd4a5e17 Set version in one place 2015-11-11 07:22:07 -08:00
0550f1217c Store unsigned char value in uint_value instead of int_value 2015-11-11 06:45:27 -08:00
d6d019aa12 Don't assume that StringRef::compare returns +/-1 2015-11-11 06:44:57 -08:00
477962884e Add a release script 2015-11-10 08:20:21 -08:00
aa741bafe6 Don't assume that char_traits::compare returns +/-1 (#225) 2015-11-10 06:40:20 -08:00
8b86a74ad5 Allow formatting C strings as pointers (#223) 2015-11-09 07:17:36 -08:00
7c24973637 Format (un)signed char as integer by default (#217) 2015-11-05 20:46:22 -05:00
9beb01d8e5 Add an appveyor/cmake workaround 2015-11-04 10:19:59 -05:00
5b7dd17dff Merge pull request #220 from inguin/master
Fix warnings
2015-11-04 09:55:36 -05:00
41ebedf516 Fix warning when building with -Wundef and disabled exceptions 2015-11-03 11:21:09 +01:00
9954aa064b Disable GCC sign-compare warning in the header file 2015-11-03 11:14:48 +01:00
f4d8884af1 Add casts to fix warnings with -Wconversion 2015-11-02 19:14:47 +01:00
fe34b2f357 Fix bogus warning when compiling with -Wctor-dtor-privacy 2015-11-02 18:33:35 +01:00
8af9bf1d06 Use FMT_SECURE_SCL instead of _SECURE_SCL 2015-11-02 09:22:59 -05:00
de3cea7f02 Merge pull request #218 from inguin/master
Fix warnings
2015-11-02 09:08:25 -05:00
27c2e880d0 Fix warning when building with -Wfloat-equal 2015-11-02 14:44:27 +01:00
b4b13ee2b8 Fix warnings when compiling with -Wundef 2015-11-02 13:55:31 +01:00
96d518f2f8 Update ChangeLog.rst 2015-10-30 08:23:35 -07:00
0cb37ce2eb Merge branch 'master' of github.com:cppformat/cppformat 2015-10-30 07:55:06 -07:00
82acd483ae Fix warnings (#216) 2015-10-30 07:54:55 -07:00
b1a55d50bf Update ChangeLog.rst 2015-10-30 07:43:15 -07:00
e1ed1d789c Update ChangeLog.rst 2015-10-30 07:35:18 -07:00
dc7a372bfc Update ChangeLog.rst 2015-10-30 06:56:07 -07:00
387b23f890 Update ChangeLog.rst 2015-10-30 06:45:56 -07:00
1133fe8ab0 Update ChangeLog.rst 2015-10-30 06:24:36 -07:00
0bfa6bed4b Update ChangeLog.rst 2015-10-30 06:20:13 -07:00
a4e3cf834b Update ChangeLog.rst 2015-10-29 08:26:03 -07:00
09e288e55b Update ChangeLog.rst 2015-10-29 08:24:31 -07:00
17869454c2 Update ChangeLog.rst 2015-10-29 07:41:26 -07:00
6a93dda265 Update ChangeLog.rst 2015-10-29 07:28:47 -07:00
4d3be75bcd Update ChangeLog.rst 2015-10-29 07:24:54 -07:00
587b4894ba Update ChangeLog.rst 2015-10-29 07:24:39 -07:00
c6a67b91de Update ChangeLog.rst 2015-10-29 07:16:59 -07:00
2ebdd49e96 Update ChangeLog.rst 2015-10-29 07:14:21 -07:00
b3411bdeed Update ChangeLog.rst 2015-10-29 06:44:51 -07:00
0ba89d256b Update ChangeLog.rst 2015-10-29 06:28:51 -07:00
c04617c8d4 Update ChangeLog.rst 2015-10-29 06:24:15 -07:00
fa88490453 Merge branch 'master' of github.com:cppformat/cppformat 2015-10-28 12:22:08 -07:00
7638a3be1e Fixed virtualenv activation on Windows
Thanks to @mapgccv.
2015-10-28 12:21:57 -07:00
7610e98a37 Update ChangeLog.rst 2015-10-28 08:31:12 -07:00
333770bfa3 Update ChangeLog.rst 2015-10-28 08:15:40 -07:00
1b187ce57f Update ChangeLog.rst 2015-10-28 08:13:36 -07:00
bcc136de81 Update ChangeLog.rst 2015-10-28 08:03:18 -07:00
83b639987c Update ChangeLog.rst 2015-10-28 08:01:06 -07:00
1942ff4c70 Update ChangeLog.rst 2015-10-28 08:00:25 -07:00
fef203bf6c Update ChangeLog.rst 2015-10-28 07:49:31 -07:00
1df1af0245 Update ChangeLog.rst 2015-10-28 07:21:08 -07:00
d2f707e33a Remove broken biicode badge 2015-10-28 07:17:57 -07:00
4800554fc2 Update ChangeLog.rst 2015-10-28 07:09:17 -07:00
0bf9b07173 Update ChangeLog.rst 2015-10-28 07:08:45 -07:00
2d727e7d0e Suppress bogus coverity warnings 2015-10-28 07:01:28 -07:00
522e0e8371 Merge branch 'master' of github.com:cppformat/cppformat 2015-10-28 06:31:45 -07:00
316b05cf34 Avoid magic constants 2015-10-28 06:31:37 -07:00
17960dd3d3 Remove unused parameter name 2015-10-28 06:23:22 -07:00
9bbdf3b4c9 Update ChangeLog.rst 2015-10-27 21:59:42 -07:00
def5d983de Update ChangeLog.rst 2015-10-27 21:55:57 -07:00
4822044dc9 Update ChangeLog.rst 2015-10-27 08:41:10 -07:00
247fe7a2a6 Update ChangeLog.rst 2015-10-27 08:27:07 -07:00
b91eea5549 Update ChangeLog.rst 2015-10-27 08:22:11 -07:00
87a2a61d56 Update ChangeLog.rst 2015-10-27 07:03:42 -07:00
f27f848bb8 Update ChangeLog.rst 2015-10-27 06:55:25 -07:00
5b7d8db684 Merge pull request #215 from dmkrepo/master
MSVC 2015 supports noexcept
2015-10-26 06:16:47 -07:00
b92c60c171 MSVC 2015 supports noexcept 2015-10-26 13:11:04 +03:00
d1ae63032d Update ChangeLog.rst 2015-10-25 08:58:05 -07:00
acfa858e3c Disable wchar_t instead of unsigned short overload
if _NATIVE_WCHAR_T_DEFINED is defined
2015-10-25 07:13:45 -07:00
716ab0499d Merge pull request #214 from slavanap/master
MS Visual Studio "/Zc:wchar_t-" compiler parameter support added
2015-10-25 07:11:56 -07:00
4e9faed8f9 MS Visual Studio "/Zc:wchar_t-" compiler parameter support added 2015-10-25 14:37:31 +03:00
024eae91fb Update ChangeLog.rst 2015-10-23 08:41:30 -07:00
2167da4bb3 Update ChangeLog.rst 2015-10-23 08:15:45 -07:00
fe3d4513cc Update ChangeLog.rst 2015-10-23 08:04:00 -07:00
59442e968d Update ChangeLog.rst 2015-10-23 07:23:54 -07:00
74ea872b0c Update ChangeLog.rst 2015-10-23 07:20:54 -07:00
ef741a4649 Update ChangeLog.rst 2015-10-23 07:17:38 -07:00
c43603b363 Update ChangeLog.rst 2015-10-23 07:10:24 -07:00
a5b45dc389 Update ChangeLog.rst 2015-10-23 07:09:26 -07:00
64e66befd5 Update ChangeLog.rst 2015-10-23 07:00:45 -07:00
ce973be1bb Udate changelog 2015-10-23 06:52:12 -07:00
ae48a4c6f9 Add missing include 2015-10-22 08:56:52 -07:00
f080b62047 Implement StringRef comparison operators
and use lexicographical comparison (#183)
2015-10-22 08:41:42 -07:00
fb27723a9f Try fixing bogus coverity warnings, take n 2015-10-22 07:33:01 -07:00
b64913b00b Suppress bogus coverity warnings 2015-10-22 05:58:37 -07:00
869ed1ec19 Update breathe 2015-10-21 16:08:50 -07:00
ecbfdb46d3 Fix sanitize 2015-10-21 10:39:58 -07:00
23e84472b2 Hook Coverity model file 2015-10-21 08:45:48 -07:00
ab25cd2c8b Suppress a bogus coverity warning 2015-10-21 08:30:10 -07:00
13e0e38d99 Workaround a bogus coverity warning 2015-10-21 07:17:48 -07:00
cd097d334e Workaround bogus coverity warnings 2015-10-21 06:16:55 -07:00
adee0dfc39 Fix travis config 2015-10-20 08:48:25 -07:00
cb5a1698c9 Update breathe to fix overload issue 2015-10-20 08:39:34 -07:00
c684886dfc Make coverity happy 2015-10-20 08:29:41 -07:00
221dd0cb66 Try workaround for a bogus Coverity warning 2015-10-20 07:22:38 -07:00
a68ce59c74 Ignore bin in subdirectories 2015-10-20 07:17:20 -07:00
3814a07c44 Handle fast forward in update-coverity-branch.py 2015-10-20 07:14:40 -07:00
49382a0aa7 Ignore .so files 2015-10-20 07:14:11 -07:00
d25d775ae6 Suppress bogus coverity warnings 2015-10-20 06:26:31 -07:00
22d572d7a2 Fix potential segfault when exceptions are disabled 2015-10-20 06:23:16 -07:00
a9582bb1a2 Update coverity branch 2015-10-19 08:39:47 -07:00
5a648b300f Suppress another bogus warning in Coverity 2015-10-19 08:39:31 -07:00
85a93a8078 Suppress another bogus warning in Coverity 2015-10-19 08:25:30 -07:00
56d3b9135f Try a workaround for a bogus Coverity warning 2015-10-19 08:17:05 -07:00
317ff51fd9 Add a script to update the coverity branch 2015-10-19 08:08:23 -07:00
6bed5e5b01 Merge branch 'master' of github.com:cppformat/cppformat 2015-10-19 08:05:18 -07:00
931173ab77 Move appveyor.yml to support 2015-10-19 08:05:09 -07:00
3242e624d5 Update branch name and remove .gitattributes 2015-10-19 08:01:18 -07:00
566f393b49 Update coverity branch 2015-10-19 07:59:45 -07:00
a43e242716 ours -> keep-ours 2015-10-18 10:24:54 -07:00
5405b09ff4 Merge pull request #212 from dean0x7d/fix_shared_lib
Fix shared library build on OS X
2015-10-18 09:22:10 -07:00
e81c0aef39 Fix bogus coverity warnings. 2015-10-18 09:16:10 -07:00
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
6049fd9d66 Merge pull request #208 from JodiTheTigger/Make-streams-optional
Issue 205: Make iostream support optional.
2015-10-18 08:40:01 -07:00
77b32006a3 Workaround a bug in MSVC when _CRTDBG_MAP_ALLOC is defined 2015-10-18 06:42:24 -07:00
9608a98b01 Fix shared library build on OS X 2015-10-18 14:49:17 +02:00
caa8f76a88 Make content wider on medium-size devices (#210) 2015-10-17 17:35:51 -07:00
044ef900bc Grammar 2015-10-17 08:34:58 -07:00
6d9712c7fd Fix links 2015-10-17 08:21:23 -07:00
826edabae1 Add building the documentation section 2015-10-17 08:17:32 -07:00
5898720c28 Make documentation build script compatible with Python 3 2015-10-17 08:05:58 -07:00
a596b8724b Improve error message when less is not installed 2015-10-16 08:28:58 -07:00
79d7aacff3 Remove diagnostics 2015-10-16 08:13:54 -07:00
aaa8b1e0aa Upgrade distribute if it is 0.6.24 or lower
because installation of sphinx with distribute 0.6.24 available on Travis
is broken.
2015-10-16 08:07:44 -07:00
2d921c96e0 Update sphinx 2015-10-16 07:34:38 -07:00
ee1fdc575b Print alabaster version 2015-10-16 07:18:04 -07:00
418cd1c82a Pip show no more 2015-10-16 07:03:45 -07:00
884c55741f Install a version of sphinx without sphinx-rtd-theme
because the latter breaks the sphinx-build
2015-10-16 07:00:19 -07:00
2cca51c744 Issue 205: Make iostream support optional. 2015-10-16 08:04:53 +13:00
221eeda912 Remove diagnostics which is not working 2015-10-15 08:30:16 -07:00
d57c6204cd Try installing the stupid sphinx-rtd-theme explicitly 2015-10-15 08:26:44 -07:00
694bfb5309 sphinx-rtd-theme -> sphinx_rtd_theme 2015-10-15 08:19:33 -07:00
9daa774b5b Import pkg_resources after activating virtualenv 2015-10-15 08:13:32 -07:00
1554c9c6e5 Diagnose sphinx-build failure on Travis 2015-10-15 08:09:19 -07:00
2a4f98f474 Diagnose sphinx-build failure on Travis 2015-10-15 07:54:41 -07:00
39265a4288 Try the latest version of pip 2015-10-15 07:40:34 -07:00
a257d811d8 Check if pip has __version__ 2015-10-15 07:20:52 -07:00
238d6dc506 Try importing pip after activating virtualenv 2015-10-15 07:14:57 -07:00
a5b296a484 More diagnostics 2015-10-15 07:08:26 -07:00
e854c7d47e Check if pip is updated 2015-10-15 06:41:16 -07:00
e61f4d2bf6 Upgrade to pip 1.5.4 2015-10-14 08:36:58 -07:00
ee6f4e7aec Check pip version once and skip pip show for now 2015-10-14 08:31:54 -07:00
13c633223e Upgrade pip on Travis 2015-10-14 08:17:39 -07:00
a08bc864fb Add more diagnostics 2015-10-14 07:13:23 -07:00
95fa85cf04 Try uninstalling older version of sphinx 2015-10-14 07:06:13 -07:00
f4d38ce3ea Add more diagnostics 2015-10-14 06:52:07 -07:00
d6ecf3ae61 Add more diagnostics 2015-10-14 06:43:30 -07:00
6dae7f3ba6 Add more diagnostics 2015-10-14 06:39:07 -07:00
08bcf61fb2 Add --upgrade option to pip 2015-10-14 06:27:41 -07:00
bdbac0b78f More diagnostics 2015-10-13 08:55:05 -07:00
5bc908623c Add diagnostics to the documentation build script 2015-10-13 08:45:49 -07:00
7732688b80 If Sphinx is already installed but version doesn't match, reinstall it 2015-10-13 08:24:16 -07:00
9575e77e40 Merge pull request #207 from dean0x7d/udl-api
Update Sphinx with C++11 literals fix and add fmt::literals API docs
2015-10-13 07:26:25 -07:00
358ae822bb Update Sphinx with C++11 literals fix and add fmt::literals API docs 2015-10-13 00:35:22 +02:00
dd60ec673c Merge pull request #206 from dean0x7d/udl-docs
Document user-defined literals
2015-10-11 10:58:08 -07:00
47e26cdc37 Document user-defined literals 2015-10-11 02:34:20 +02:00
2eda8313af Merge branch 'udl' of github.com:dean0x7d/cppformat into udl 2015-10-09 08:20:46 -07:00
c0813c59f3 Work around UDL macro stringification bug on some versions of GCC
See bug report: https://gcc.gnu.org/ml/gcc-bugs/2015-04/msg02027.html
2015-10-09 11:55:36 +02:00
3b9765f858 Merge pull request #204 from dean0x7d/udl
User-defined literals for format and named arguments
2015-10-07 07:13:07 -07:00
bc6010cc21 Add _a literal for named arguments 2015-09-27 04:09:37 +02:00
a63a24f2d7 Add _format literal 2015-09-27 04:00:24 +02:00
50e9487e18 Merge branch 'master' of github.com:cppformat/cppformat 2015-09-18 16:26:53 -07:00
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
a12f49669c Add Stellar to the list of projects using C++ Format 2015-09-16 21:45:27 -07:00
42d8f5b994 Add redis-cerberus to the list of projects using cppformat 2015-09-16 21:33:51 -07:00
79d8f59906 Implement formatting of objects with (s)printf. 2015-09-08 08:36:20 -07:00
59155abbf3 Remove extra newline 2015-09-08 08:16:12 -07:00
d48047e4c0 Break long line 2015-08-31 08:22:25 -07:00
005379ac6f Don't include .buildinfo and .doctrees in the source package
Thanks to Dave Johansen.
2015-08-31 08:21:59 -07:00
75fdfe3e0e Make options that control target generation more consistent 2015-08-31 06:49:06 -07:00
6de8f4a416 Merge pull request #200 from maddinat0r/master
add CMake option to toggle doxygen documentation
2015-08-31 06:32:05 -07:00
06c1859420 add CMake option to toggle doxygen documentation 2015-08-30 14:23:54 +02:00
5bcd5ac6d6 Merge branch 'master' of github.com:cppformat/cppformat 2015-08-26 10:13:12 -07:00
4807f69ab4 Remove duplicate EXLUDE_SYMBOLS 2015-08-26 10:13:04 -07:00
c2ba9e191d Merge pull request #199 from maddinat0r/master
add generated "run-msbuild.bat" file to gitignore
2015-08-21 10:23:00 -07:00
edf5c26001 add generated "run-msbuild.bat" file to gitignore 2015-08-21 19:09:18 +02:00
b3714625c0 Fix compilation with FMT_PEDANTIC=ON 2015-08-19 08:03:17 -07:00
1bba22667e Fix build on CMake 2.6 2015-08-19 07:32:48 -07:00
d07fd577c3 FMT_SOURCE_FILES -> FMT_SOURCES 2015-08-19 07:27:34 -07:00
4274f15f0d Move test-specific stuff to test/CMakeLists.txt 2015-08-19 07:27:08 -07:00
0d99eb5d6b Merge pull request #198 from maddinat0r/master
add CMake option to toggle tests (on by default)
2015-08-19 06:49:53 -07:00
914b97859c add CMake option to toggle tests (on by default) 2015-08-19 10:41:37 +02:00
4150fa0f95 Fix formatting 2015-08-18 06:57:31 -07:00
4e2a0a7e1c Merge pull request #197 from maddinat0r/master
new CMake option to disable generating the install target
2015-08-18 06:34:09 -07:00
2161823559 add option to disable install 2015-08-17 18:48:16 +02:00
2923d7f588 Merge pull request #196 from jkflying/patch-1
Fix warnings
2015-08-17 06:24:47 -07:00
11395c4f09 Fix warnings
Child attribute was being instantiated before parent attribute, gives warnings under GCC 4.9.1
2015-08-17 13:59:45 +02:00
32fbc083b7 Add Touch Surgery to the list of projects using C++ Format 2015-08-08 18:58:25 -07:00
8c4483d3cb Try appveyor config without explicit platform 2015-08-07 07:39:56 -07:00
b247d81046 Fix warnings 2015-08-07 07:39:04 -07:00
c3ba615c65 Fix warnings 2015-08-07 07:34:58 -07:00
cdcdacef9c Handle undefined $PLATFORM 2015-08-07 07:21:43 -07:00
a8a2982b9a Fix test 2015-08-07 07:13:43 -07:00
2202541364 Disable configuration that doesn't work on appveyor 2015-08-07 07:12:22 -07:00
ca7478144d Fix warnings 2015-08-07 07:08:46 -07:00
43081b833a Build both on x86 and x64 2015-08-07 07:08:12 -07:00
2c6e32f6ff Simplify appveyor config 2015-08-07 06:41:07 -07:00
58fcf0c0da Optimize format_decimal 2015-08-05 07:50:29 -07:00
f6135df529 Merge the master branch 2015-08-04 20:59:24 -07:00
ecdc7ec1f1 Fix more warnings 2015-08-04 08:01:28 -07:00
7fa17fe772 Fix warnings 2015-08-04 07:55:33 -07:00
a8d12ade1c Append compile flags instead of overwriting 2015-08-04 07:46:15 -07:00
f9813c313d Merge pull request #191 from rpopescu/master
fixed #190 Argument shadowing and Clang pedantic support
2015-08-04 07:41:15 -07:00
5b8d0a7aa9 Make Coverity happy 2015-08-04 07:22:03 -07:00
64eb3d8bb2 Make Coverity happy 2015-08-04 07:09:00 -07:00
0affb23560 fixed #190 Argument shadowing and Clang pedantic support 2015-08-04 12:52:44 +02:00
1e8496da4a Keep our .travis.yml during merge
because it contains Coverity Scan configuration.
2015-07-31 09:38:08 -07:00
b634309a31 Merget the master branch 2015-07-31 08:58:32 -07:00
7e12c5c9df Use scoped_ptr instead of raw pointers in tests 2015-07-31 08:54:54 -07:00
2830cf65c9 Merge the master branch 2015-07-31 08:24:37 -07:00
d15e0d3e06 Use scoped_ptr instead of raw pointers in tests 2015-07-31 08:23:39 -07:00
b022790f3b Merge the master branch 2015-07-31 08:05:25 -07:00
922fe90ac3 Improve integer formatting performance
and fix bogus Coverity warning about uncaught exception in
format_error_code (via write_int).
2015-07-31 08:02:38 -07:00
fabd3a84c5 Don't build anything during coverity scan 2015-07-29 13:42:06 -07:00
611eb774ca Remove Coverity config from Travis
The config is now in the coverity_scan branch
2015-07-29 07:40:20 -07:00
45e7b5b672 Run Coverity scan on a single machine 2015-07-29 07:37:21 -07:00
4b6a52c6f8 Add Coverity scan to Travis CI 2015-07-29 07:18:43 -07:00
d02a5031f0 Use scoped_ptr instead of deprecated auto_ptr 2015-07-29 07:03:15 -07:00
200037683e Initialize next_arg_index_ in ctor (#187) 2015-07-28 08:10:46 -07:00
c4d0bc1ac9 Fix Coverity warnings 2015-07-28 07:18:14 -07:00
0eac037416 Get rid of the BasicFormatter::start_ 2015-07-28 06:46:41 -07:00
69a0317590 Merge pull request #189 from xentec/patch-1
Fixing doc building with newer pip versions
2015-07-26 13:55:35 -07:00
583f7e9e1c Fix build docs on with newer pip versions
A patch for 3b224e1813
2015-07-26 17:50:18 +02:00
0586a9e4ea Specify python version in doc build script
Some distros changed their default to python3 causing it to fail.
2015-07-26 17:48:26 +02:00
3b224e1813 Fix handling of pip show result when using new version of pip
which returns nonzero error code if the package is not installed.
2015-07-26 08:25:52 -07:00
76d1218345 Workaround a bug in MSVC2010 (#188)
Due to broken lookup rules, MSVC finds fmt::internal::check
instead of IsConvertibleToInt::check.
2015-07-10 07:58:27 -07:00
e498ffbb3d Fix rpmlint warning about unused dependency on libm.so.6 2015-07-10 07:02:50 -07:00
6cf24c7f92 Fix MSVC warnings 2015-07-08 08:04:32 -07:00
4f7ad14c2b Fix MSVC warning 2015-07-08 07:52:03 -07:00
f3bef7ac92 Fix open_buffered_file 2015-07-08 07:48:54 -07:00
b6c1c9233a Workaround an issue with VC2010 2015-07-08 07:36:36 -07:00
6484a15ca0 Fix MSVC warnings 2015-07-08 07:35:57 -07:00
c669cbedf8 Rename None to Null because of conflict with an xlib.h macro 2015-07-07 07:05:17 -07:00
7859f81233 Don't use pthreads if they are not available 2015-06-29 07:34:30 -07:00
0332284ce3 Fix MinGW build on Appveyor by changing search path order
C:\MinGW\bin should go first to prevent executables from older
version of MinGW in C:\MinGW\mingw32 being picked up.
2015-06-29 07:22:45 -07:00
7154238d45 Add terminating null character in UTF coverters 2015-06-27 09:11:15 -07:00
279749168a Try to work around an issue with msbuild caused by Appveyor update 2015-06-27 08:38:26 -07:00
ba09c1b56e Fix windows build 2015-06-26 09:23:11 -07:00
df0835ac27 Update docs 2015-06-26 09:09:23 -07:00
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
88c7c20102 Fix posix-test on FreeBSD (#179) 2015-06-25 07:06:30 -07:00
761a0afb85 Correct path to doxyxml (#182) and break long line 2015-06-25 06:56:54 -07:00
5b9b485f57 Workaround a bug in MinGW 2015-06-24 11:36:28 -07:00
0a7e5141c1 Move posix tests from gtest-extra-test to a separate test 2015-06-24 09:16:03 -07:00
9769f4b9ed Refactor posix tests 2015-06-24 08:43:30 -07:00
e5b16e80cc Include sys/types.h for ssize_t 2015-06-24 07:59:19 -07:00
948317b6dd Fix FormatLongDouble test on PowerPC (#180) 2015-06-23 07:39:49 -07:00
958299dd7f Install format.h to '<prefix>/include/cppformat'
not to '<prefix>/include'. Thanks to Eugene V. Lyubimkin for the patch.
2015-06-23 06:49:35 -07:00
b88a17ad9e libformat.{a.so} -> libcppformat.{a.so}
as suggested by Eugene V. Lyubimkin to make the name less generic
2015-06-23 06:40:22 -07:00
abcc2d96f0 Fix assertion tests 2015-06-22 09:24:54 -07:00
8ab665afbc Only use death tests if available 2015-06-22 08:17:23 -07:00
8450f5e1d3 FormatIntTest: FormatDec: don't assume signedness of char type
Thanks to Eugene V. Lyubimkin for the patch.
2015-06-22 07:03:26 -07:00
2e874af293 Move CSS compilation to build.py for use by Travis 2015-06-22 06:54:29 -07:00
dd6a3bbc7c Fix out-of-tree documentation build (#177) 2015-06-22 06:40:21 -07:00
a0ed6bfe4f Break long line 2015-06-17 08:07:05 -07:00
e39490500c Replace implicit conversion to std::string with to_string 2015-06-17 07:59:41 -07:00
147e5ebbbc Move casts to CharTraits for custom character types 2015-06-17 07:21:16 -07:00
270069beda Use arg visitor when formatting printf argument
and get rid of ignore_incompatible_str.
2015-06-16 07:36:32 -07:00
9b6b3382e3 Don't use ignore_incompatible_str in ArgFormatter 2015-06-15 07:15:28 -07:00
63f6c10449 Suppress a warning about unused strerror_r. 2015-06-14 09:36:23 -07:00
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
24c309fbfa Don't use windows.h if FMT_USE_WINDOWS_H is set to 0 2015-06-12 07:15:57 -07:00
9d09214e7a Use textual representation for bool by default (#170) 2015-06-11 09:00:06 -07:00
fd5c2e909b Report error when using precision with char 2015-06-11 08:58:31 -07:00
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
b83ab16676 Break long lines 2015-06-11 06:14:42 -07:00
e5005c98b0 Merge branch 'master' of github.com:cppformat/cppformat 2015-06-11 06:10:26 -07:00
834618ee28 Merge pull request #174 from jamboree/feature/named-arg
Fix name parsing
2015-06-11 06:03:34 -07:00
3c99ed4498 Fix name parsing 2015-06-11 12:03:22 +08:00
2e254ad19d arg_index -> arg_id 2015-06-10 09:08:49 -07:00
a98583dde3 Move ArgList::Map to the internal namespace and rename to ArgMap
since it shouldn't be a part of the public API. Also break long lines.
2015-06-10 08:49:22 -07:00
4325c155f7 Improve documentation
* Fix formatting in `fmt::arg` apidoc
* Use production syntax instead of regex
* Rename arg_field to arg_id because the term "field" denotes the whole replacement field
* Define `integer`
2015-06-10 07:33:17 -07:00
83659f425b Merge pull request #173 from jamboree/feature/named-arg
Support named arguments
2015-06-10 06:38:27 -07:00
7487bde587 Support named arguments 2015-06-10 09:32:59 +08:00
ed2dfe5124 Implement writing narrow strings into a wide writer 2015-06-09 08:20:44 -07:00
8949a2e941 Fix formatting 2015-06-08 06:53:18 -07:00
a5e7d08ad0 Merge branch 'master' of github.com:cppformat/cppformat 2015-06-04 12:52:49 -07:00
99edb141ec Don't try updating cppformat.github.io without permissions 2015-06-04 12:52:42 -07:00
03bf6dea67 Merge pull request #168 from jamboree/master
Support runtime width specification
2015-06-04 09:23:15 -07:00
54a6cb34c7 Support runtime width specification 2015-06-04 13:59:37 +08:00
d311927c64 Update Breathe and document BasicArrayWriter(Char (&array)[SIZE])
Fixes #125
2015-06-03 18:21:01 -07:00
4d521064cf Give an error if fill is not convertible to Char in StrFormatSpec 2015-06-03 08:39:43 -07:00
d8a3b74664 Simplify download with urllib.urlretrieve 2015-05-24 08:03:22 -07:00
ce5ab7d68f Exclude internal symbols from the docs 2015-05-24 07:48:22 -07:00
5a61d54eb7 Install newer version of Doxygen because of a bug in version 1.7.6.1 (#162) 2015-05-24 07:48:06 -07:00
3310849fa0 Don't use placeholder on the search page 2015-05-23 13:41:21 -07:00
f478f7f490 Comment 2015-05-23 13:34:44 -07:00
b902efd870 Update classes 2015-05-23 12:48:09 -07:00
921f1bae46 .container -> .tb-container (fixes #165) 2015-05-23 12:28:41 -07:00
079c6442e1 Fix HTML errors 2015-05-23 11:59:04 -07:00
9e83b8a6e0 Move Google analytics block to the top
because according to Google:

One of the main advantages of the asynchronous snippet is that you can position it at the top of the HTML document. This increases the likelihood that the tracking beacon will be sent before the user leaves the page. It is customary to place JavaScript code in the section, and we recommend placing the snippet at the bottom of the section for best performance.
2015-05-23 11:42:57 -07:00
e1fcb0a2b5 Remove doctype and add meta tags 2015-05-23 11:38:36 -07:00
eaf30d5b0d Move "What users say" to the front page 2015-05-23 08:33:55 -07:00
9af6c41684 Use template comments because they are removed from output 2015-05-23 08:31:29 -07:00
9ca1ce293e Make instantiation of BasicData consistent with its definition 2015-05-23 08:04:06 -07:00
bfe9267d4d Bootstrapify 2015-05-22 19:21:55 -07:00
42001e541e Add basic-bootstrap theme 2015-05-22 19:12:45 -07:00
ba994e78ec Use dev instead of version for the development version 2015-05-22 07:50:46 -07:00
f5f9f50f87 Update links 2015-05-22 07:24:23 -07:00
63572da4e7 Fix formatting 2015-05-22 07:22:55 -07:00
78936ad6d7 Fix formatting 2015-05-22 07:08:16 -07:00
eb50269744 Update the documentation link 2015-05-22 06:50:46 -07:00
c389ec05a1 Redirect from RTD to GitHub Pages 2015-05-22 06:47:05 -07:00
e4c0046a99 Update documentation links 2015-05-22 06:41:03 -07:00
dfe2a65b5d Remove diagnostics and re-enable build configs 2015-05-21 20:25:15 -07:00
efba235246 Regenerate key and prevent leakage 2015-05-21 19:29:45 -07:00
0022e0b40f Update key 2015-05-21 19:11:32 -07:00
44fabfc803 Add diagnostics 2015-05-21 19:01:47 -07:00
e15eae012c Fix travis config 2015-05-21 09:13:35 -07:00
5d570d7ee9 Add a travis key 2015-05-21 09:05:34 -07:00
9f60609405 Customize search 2015-05-21 09:03:22 -07:00
37141a1e3f Install less-plugin-clean-css 2015-05-21 08:26:36 -07:00
719208c24b Now do the same as root 2015-05-21 08:14:47 -07:00
3e49279267 Add APT key 2015-05-21 08:03:00 -07:00
595845153d Fix nodesource.list creation 2015-05-21 07:20:26 -07:00
f77b00e1f7 Try installing new version of lessc 2015-05-21 07:04:56 -07:00
eb20f8aece Try installing lessc 2015-05-20 18:22:53 -07:00
1456a496f0 Hide the navbar search box on the Search page 2015-05-20 18:22:35 -07:00
fbc2fcb3e2 Create a link for node_modules 2015-05-20 12:29:47 -07:00
fca83df599 Support old version of pip installed on Travis, take 2 2015-05-20 11:45:16 -07:00
6955417236 Support old version of pip installed on Travis 2015-05-20 11:10:16 -07:00
469f3674cf Ignore build files and simplify building docs locally 2015-05-20 08:28:54 -07:00
702e53d7a8 Correct excludes 2015-05-20 08:07:46 -07:00
f9936c4859 Build docs on travis 2015-05-20 08:06:12 -07:00
abba1477a7 Remove duplicate namespace 2015-05-19 18:38:21 -07:00
183ce52c41 Improve style 2015-05-19 18:20:27 -07:00
86aa72f3d5 Fixed unresolved references 2015-05-19 18:04:32 -07:00
0ba61ffa6d Improve style 2015-05-19 17:58:04 -07:00
c17f4ec099 Make sure the navbar content is not shifted because of scrollbars
https://github.com/twbs/bootstrap/issues/1648
2015-05-19 08:30:16 -07:00
56d5335e3f Merge branch 'master' of github.com:cppformat/cppformat 2015-05-19 08:13:29 -07:00
18a55cdb27 Customize Sphinx theme 2015-05-19 08:13:13 -07:00
4c1a0303aa Create and keep virtualenv in the current (build) directory 2015-05-18 08:09:26 -07:00
0e28acdd05 Update Sphinx to 1.3.1 to fix local search 2015-05-18 07:24:33 -07:00
4d1bd5ac18 Merge pull request #161 from syohex/correct-misspelling
Correct misspellings
2015-05-15 08:05:05 -07:00
0ba03ee823 Correct misspellings 2015-05-15 15:57:22 +09:00
2c03e822b2 Add a link to API changes/compatibility report 2015-05-14 14:18:59 -07:00
804a74c998 Explicitly instantiate BasicData<void>
https://github.com/ampl/mp/issues/55#event-305206703
2015-05-14 12:58:42 -07:00
90a12b1bb2 Fix warnings 2015-05-12 08:57:21 -07:00
a5757c86df FMT_EXTRA_TESTS -> FMT_PEDANTIC and use it to control extra warnings 2015-05-12 07:35:29 -07:00
5517c8962e Use -std=gnu++11 if -std=c++11 is broken (for MinGW) 2015-05-12 07:13:12 -07:00
684495c887 Add header files to gmock target 2015-05-12 06:53:35 -07:00
640445fc48 FMT_CPP11_IO_H -> FMT_CPP11_UNISTD_H and enable all build configs 2015-05-11 19:48:30 -07:00
e17b743141 Workaround a MinGW bug 2015-05-11 19:37:40 -07:00
c8688576f2 Fix MinGW build 2015-05-11 19:10:31 -07:00
024f8c6a0a Disable MinGW build until the remaining issues are solved 2015-05-11 09:12:34 -07:00
8035c3eb30 Workaround a bug in the definition of fstat on some versions of MinGW 2015-05-11 08:44:40 -07:00
15de5f68b4 Enable debug MinGW build 2015-05-11 08:10:13 -07:00
3913f29ad7 Fix posix-test on MinGW 2015-05-11 07:57:08 -07:00
2da08f21dd Only run compile-test if FMT_EXTRA_TESTS is set
These tests can be quite time-consuming especially on Windows
2015-05-11 07:34:07 -07:00
0e5c8e5395 Move chat link to the end 2015-05-11 07:15:11 -07:00
ea9a31b225 Merge pull request #160 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.rst
2015-05-11 07:14:10 -07:00
dd8e6b9a72 Added Gitter badge 2015-05-11 01:02:26 +00:00
c150722945 Fix compiler warnings about unused parameter (#158)
Thanks to @fmatthew5876
2015-05-08 11:20:56 -07:00
f3fc8052ab Add a section on how to install the library using Homebrew
Thanks to @ortho for adding C++ Format support to Homebrew.
2015-05-08 08:19:15 -07:00
3e03934d15 If std::swprintf is broken, disable relevant test and warn about it 2015-05-08 07:57:43 -07:00
85b985e9f2 Workaround a bug in formatting long double in MinGW, take 3 2015-05-07 08:17:30 -07:00
3e379829a0 Workaround a bug in formatting long double in MinGW, take 2 2015-05-07 07:25:39 -07:00
4888000f32 Fix a warning 2015-05-07 07:19:28 -07:00
673a4525f6 Workaround a bug in formatting long double in MinGW 2015-05-07 07:18:46 -07:00
1c72e7062b Update the license section 2015-05-07 06:47:22 -07:00
6de2edf05b Link to rendered instead of raw license file 2015-05-07 06:45:13 -07:00
fde90aa551 Move license to a separate file
This is done to follow Fedora guidelines:
https://fedoraproject.org/wiki/Packaging:LicensingGuidelines#License_Text

Also rename the Python license used in the docs to python-license.txt to
avoid confusing extension.
2015-05-07 06:43:13 -07:00
40681e6037 Fix compilation of posix-test on MinGW 2015-05-06 07:29:58 -07:00
ca2cadb1c6 Fix compilation when fileno is a macro
This can happen on broken versions of MinGW.
2015-05-06 07:19:42 -07:00
11464343a9 Fix handling of exactly MAX_PACKED_ARGS arguments 2015-05-05 10:00:11 -07:00
3c388185c0 Remove old TODO 2015-05-05 07:25:42 -07:00
f5b3c9cbec Simplify construction of ArgList objects 2015-05-05 07:23:32 -07:00
de994a27a7 Remove internal::NonZero 2015-05-01 07:58:32 -07:00
e515e5f14e Simplify construction of argument lists 2015-05-01 07:35:28 -07:00
87cb2935f8 Test and fix handling of exactly MAX_PACKED_ARGS arguments 2015-05-01 06:55:26 -07:00
969d1cdbdc Break long line 2015-04-30 08:41:17 -07:00
67ce394256 Undefine Windows min/max macros (#152)
because they break std::min/max. This only affects non-default
header-only configuration and can be disabled by defining
FMT_WIN_MINMAX.
2015-04-30 07:48:36 -07:00
f44666aac6 Remove extra parentheses 2015-04-30 07:35:04 -07:00
001054c8a0 Update README.rst 2015-04-27 07:02:15 -07:00
926b7680ea Cleanup 2015-04-21 07:17:00 -07:00
8af48bbaf1 Merge pull request #149 from cppformat/compact-arglist
Compact arglist
2015-04-21 07:05:54 -07:00
8d2559bd96 Reduce compiled code size
If the number of arguments is less than MAX_PACKED_ARGS, pass
the arguments as a Value array rather than Arg array.
2015-04-20 10:02:41 -07:00
62c483c940 Test EnableIf 2015-04-20 08:08:02 -07:00
88f4be3d19 Merge branch 'master' of github.com:cppformat/cppformat 2015-04-18 19:16:16 -07:00
c3ebcce89d Make library install dir configurable via FMT_LIB_DIR CMake var 2015-04-18 19:15:36 -07:00
0963fd0a4d Workaround a bug in implementation of variadic templates in MSVC11 2015-04-12 14:33:11 -07:00
cea64132a2 Detect tuple 2015-04-12 07:02:49 -07:00
f6823221d3 Workaround broken tuple in MSVC11 2015-04-12 06:45:40 -07:00
f35a220536 Remove .gitmodules 2015-04-10 08:44:53 -07:00
8c24a42395 Make documentation builds more reproducible by using virtualenv 2015-04-10 08:39:09 -07:00
dc3039a40d Merge branch 'master' of github.com:cppformat/cppformat 2015-04-09 07:22:19 -07:00
d2ada77ccc Install documentation 2015-04-09 07:21:42 -07:00
3a0624ab2e Update README.rst 2015-04-08 09:11:25 -07:00
fb362ef880 Set .so version for libformat 2015-04-08 07:13:06 -07:00
fd53bb6fb8 Fix bogus "conditional expression is constant" MSVC warnings 2015-04-05 11:27:07 -07:00
aab64b55a4 Update README.rst
Compile code size is actually two times smaller compared to IOStreams
2015-04-02 08:49:28 -07:00
d2387999ec Try fixing a bogus MSVC warning about buffer overrun (#145) 2015-03-28 17:52:17 -07:00
60405cf693 Use /W4 in format-test and only if FMT_EXTRA_TESTS is set
as (1) we don't want to force /W4 on users of the library and (2) some of
the warnings only show up when the formatting functions are used.
2015-03-28 17:29:12 -07:00
9c75d0ccf7 Compile with /W4 in MSVC 2015-03-28 13:21:49 -07:00
3a5573ac6e Revert commit 3c3ae4e319 2015-03-27 07:36:26 -07:00
d4ea2d7fcb Add ArgVisitor::report_unhandled_arg
and get rid of FMT_RETURN_AFTER_THROW.
2015-03-26 08:55:20 -07:00
d618f8baac Fix NonZero 2015-03-25 09:29:40 -07:00
885d1a1c64 Simplify NonZero 2015-03-25 08:50:48 -07:00
2ba3988da3 Reduce compiled code size when using variadic templates 2015-03-25 08:29:55 -07:00
66915785dd Get rid of FMT_NORETURN because it breaks when FMT_EXCEPTIONS=0 2015-03-25 07:24:26 -07:00
3c3ae4e319 MakeValue -> MakeArg 2015-03-25 07:04:16 -07:00
00df5c91f3 Merge Value into Arg 2015-03-25 06:48:21 -07:00
cf04d98d06 Pass as many types as possible in a single integer to reduce code bloat 2015-03-24 08:55:40 -07:00
1addec97bc Rename _ERR to ERROR_STR
Identifiers beginning with an underscore and an uppercase letter are
reserved [17.4.3.2.1].
2015-03-21 20:16:36 -07:00
da052ae821 Fix bogus warnings 2015-03-21 07:53:39 -07:00
72aae04adf Merge pull request #141 from Shauren/master
Support formatting more than 16 arguments with printf API when using variadic templates
2015-03-21 06:29:53 -07:00
a445e727c2 Added support to format more than 16 arguments with printf API when using variadic templates 2015-03-20 21:31:10 +01:00
45bba4f129 Document protected members of Buffer 2015-03-20 06:46:39 -07:00
73ea170966 Document the Buffer class 2015-03-20 06:42:55 -07:00
906432161b Make Buffer part of the public API 2015-03-20 06:31:24 -07:00
b9f4668855 Add missing pragma diagnostic push for clang
Thanks to @ido
2015-03-19 08:04:31 -07:00
ba81f04bfa Turn verbose output off in travis 2015-03-19 08:03:20 -07:00
100bc30773 Reset CMAKE_REQUIRED_FLAGS 2015-03-19 07:59:12 -07:00
df477565f8 Diagnose clang failures 2015-03-19 07:51:10 -07:00
a53ac7ad5c Workaround mingw bugs 2015-03-19 07:39:24 -07:00
f49ab8e4a9 Detect broken cmath 2015-03-19 07:34:50 -07:00
0e8fcd47a0 Silence warnings about convering float to int 2015-03-18 18:59:09 -07:00
bf8636c959 Fix compile error on clang when formatting a C++11-style enum
Thanks to @Naios.
2015-03-18 11:08:34 -07:00
2adbfa4af7 Test IsConvertibleToInt with a C++11 enum 2015-03-18 11:02:37 -07:00
23b60f5735 Merge pull request #138 from Naios/build1
Fix build under g++-4.9, SunOS 5.11 i386 i86pc Solaris
2015-03-18 05:53:12 -07:00
ef7d4879e4 Fix build under g++-4.9, SunOS 5.11 i386 i86pc Solaris
* thanks @VolodymyrLavrenchuk for pointing this out.
2015-03-18 10:34:47 +01:00
33ec5b16d8 Don't match bool because it causes undesirable conversions 2015-03-17 20:51:29 -07:00
275d1ab423 Fix warnings on lesser compilers 2015-03-17 20:43:55 -07:00
107a95c9cc Merge branch 'master' of github.com:cppformat/cppformat 2015-03-17 20:12:44 -07:00
3d4af9cd65 Use `long double instead of int` to avoid warnings 2015-03-17 20:12:36 -07:00
ef5972e1ca Update README.rst 2015-03-17 19:43:47 -07:00
d99c49b970 Merge branch 'master' of github.com:cppformat/cppformat 2015-03-17 07:57:39 -07:00
538c2610cb Move FMT_USE_VARIADIC_TEMPLATES definition to macro-test.cc 2015-03-17 07:57:30 -07:00
8ed6031457 Add a comment describing the use of -std=c++11 2015-03-17 07:56:55 -07:00
a6aa789f4b Merge pull request #136 from Gachapen/fix_initializer_list_check
Fix CMake FMT_INITIALIZER_LIST check failing because of wrong include name.
2015-03-17 06:48:52 -07:00
b739ec893f Fix CMake FMT_INITIALIZER_LIST check failing because of wrong include name. 2015-03-17 10:15:54 +01:00
357950e06b Fix warnings on braindamaged compilers (aka MSVC) 2015-03-16 19:02:25 -07:00
df47d819b9 Suppress bogus MSVC warning 2015-03-16 18:53:14 -07:00
a530052b7e Only include crtdbg.h when compiling with MSVC 2015-03-16 18:05:45 -07:00
eccd5e8d15 Fix test 2015-03-16 09:17:18 -07:00
93ae73adbc Fix a typo 2015-03-16 09:05:46 -07:00
2b793d2d1e Merge branch 'master' of github.com:cppformat/cppformat 2015-03-16 08:52:31 -07:00
5aecd4947f Use GetFileSize instead of GetFileSizeEx on Windows 2015-03-16 08:52:23 -07:00
c6d3a73201 Workaround MinGW's braindamage 2015-03-16 08:43:59 -07:00
4825fb4a0d Add default value for None's template argument 2015-03-16 08:43:33 -07:00
eb6baf04ff Update README.rst 2015-03-15 06:39:03 -07:00
d08c4ba84a Merge branch 'master' of github.com:cppformat/cppformat 2015-03-15 06:35:06 -07:00
4547523e19 Make dummy strerror_r and strerror_s inline and remove old comment 2015-03-15 06:34:59 -07:00
e65e05b960 Merge pull request #134 from CarterLi/master
Improve behaviors when disabling exceptions
2015-03-15 06:21:28 -07:00
80d1dd29b7 Feedback 2015-03-15 09:31:13 +08:00
c97c0fbbc9 Merge remote-tracking branch 'upstream/master' 2015-03-15 09:23:19 +08:00
e1776acd19 Handle the result of XSI-complint version of strerror_r correctly 2015-03-14 14:05:02 -07:00
341b98c6e2 Detect safe strerror variants using function overloading instead of macros 2015-03-14 13:39:33 -07:00
2d4631a580 Silence -Wunused-parameter 2015-03-14 14:54:37 +08:00
593d3aef9e Improve behaviors when disabling exceptions 2015-03-14 14:37:02 +08:00
b8c36498f2 Temporarily disable mingw build 2015-03-12 09:06:50 -07:00
97b33fe069 More mingw fixes 2015-03-12 08:57:25 -07:00
82a3e78e04 Indent 2015-03-12 08:57:00 -07:00
9f19796ef0 Remove extra #endif 2015-03-12 08:37:07 -07:00
23b7bfead0 More mingw fixes 2015-03-12 08:29:28 -07:00
57f9f06619 More mingw fixes 2015-03-12 08:11:04 -07:00
03ee6a0295 Fix mingw build 2015-03-12 08:00:56 -07:00
6bca5ca109 Woraround a bug in MinGW 2015-03-12 07:49:01 -07:00
b2207f9d05 Workaround MinGW bug https://sourceforge.net/p/mingw/bugs/2024/ 2015-03-12 07:24:15 -07:00
752580a5c2 Move sys/types.h include to posix.h for MinGW 2015-03-12 07:09:44 -07:00
93cfe9951b Woraround for braindamaged versions of MinGW 2015-03-12 06:48:14 -07:00
6dd532b456 Add mingw bin directory to path and enable mingw build 2015-03-12 06:13:51 -07:00
3b259b5120 Disable mingw build again 2015-03-11 09:04:55 -07:00
870f42e1f0 Enable mingw build with extra diagnostics 2015-03-11 07:10:43 -07:00
e3a1da5a71 Temporarily disable mingw build 2015-03-10 10:17:08 -07:00
da547f5533 Fix mingw build, take 2 2015-03-10 09:43:12 -07:00
961097315c Fix mingw build 2015-03-10 09:18:31 -07:00
f9e1c2bd59 Use preinstalled mingw on appveyor 2015-03-10 08:52:39 -07:00
8c8826f749 Merge branch 'master' of github.com:cppformat/cppformat 2015-03-10 07:53:57 -07:00
5821aec7b9 Implement printing of values that are convertible to int such as enums 2015-03-10 07:53:46 -07:00
689ea8d3dd Merge pull request #130 from cstamford/master
Added the define FMT_SWPRINTF to allow compilation under TDM-gcc (and po...
2015-03-10 06:34:07 -07:00
55836caa8d Added the define FMT_SWPRINTF to allow compilation under TDM-gcc (and possibly other MinGW distributions). 2015-03-10 07:04:31 +00:00
a037a829f5 Update README.rst 2015-03-09 09:29:46 -07:00
7e251643db Update README.rst 2015-03-09 08:48:08 -07:00
08d759c425 Merge branch 'master' of github.com:cppformat/cppformat 2015-03-09 07:37:34 -07:00
6af3da1089 Merge website content into docs 2015-03-09 07:37:27 -07:00
eec6b29b64 Update ChangeLog.rst 2015-03-06 08:58:54 -08:00
0b097da31e Set release date 2015-03-06 08:33:25 -08:00
f9e98c2007 Merge branch 'master' of github.com:cppformat/cppformat 2015-03-06 08:30:38 -08:00
2d80bcc1cb Bump version 2015-03-06 08:30:30 -08:00
fa5b35e539 Update ChangeLog.rst 2015-03-06 08:17:13 -08:00
549b61e958 Update ChangeLog.rst 2015-03-06 08:15:11 -08:00
2d200e3caa Update ChangeLog.rst 2015-03-06 08:14:19 -08:00
3252eead94 Update ChangeLog.rst 2015-03-06 08:03:34 -08:00
d82b6c7e62 Update ChangeLog.rst 2015-03-06 08:03:11 -08:00
55ba812d12 Update ChangeLog.rst 2015-03-06 07:52:51 -08:00
5463a62d43 Update ChangeLog.rst 2015-03-06 07:52:06 -08:00
9350328086 Update ChangeLog.rst 2015-03-06 07:32:28 -08:00
9d1fc0ecd5 Update ChangeLog.rst 2015-03-06 07:18:44 -08:00
9c006520bd Break long lines 2015-03-05 08:15:26 -08:00
8ad6f93428 Update changelog 2015-03-05 08:04:27 -08:00
72c97ab4ab Add missing '>' 2015-03-05 07:31:27 -08:00
bcc2fd1dbe Fix markup 2015-03-05 07:30:50 -08:00
a89f578c14 Update changelog 2015-03-05 07:29:54 -08:00
6005907db6 Fix markup 2015-03-05 07:27:14 -08:00
53dd7d1583 Update changelog 2015-03-05 07:26:44 -08:00
65a8a7f85e Fix markup 2015-03-04 19:03:56 -08:00
89e0684da6 Update changelog 2015-03-04 19:02:59 -08:00
a5c6975118 Use issue numbers instead of links 2015-03-04 18:50:46 -08:00
ec7b006fab Update changelog 2015-03-04 18:49:23 -08:00
c1f8274701 Copy info from releases to changelog 2015-03-04 18:30:00 -08:00
91d9497911 Fix markup 2015-03-04 18:16:26 -08:00
3453df6d65 Add a changelog 2015-03-04 18:10:08 -08:00
648c730bd2 CMake should be now preinstalled on OS X
https://github.com/travis-ci/travis-ci/issues/2408
2015-03-04 15:15:31 -08:00
8abc15f85e Fix a reference 2015-03-04 14:04:10 -08:00
4ff6ab396c Fix biicode build script 2015-03-04 09:24:54 -08:00
14d1fb561f Don't run biicode on Travis 2015-03-04 09:22:52 -08:00
7ae6dfbcba Fix cmake command 2015-03-04 08:57:56 -08:00
bdada10c2c Only run biicode-build on Linux and print cmake version 2015-03-04 08:53:51 -08:00
65cf5414c9 Temporarily disable biicode build 2015-03-04 08:33:13 -08:00
cb40e7c60b Fix biicode-build script 2015-03-04 08:24:35 -08:00
3a9b7ad8b6 Pass env to bii 2015-03-04 08:07:26 -08:00
38b5f573dd Set CMAKE_ROOT 2015-03-04 08:01:56 -08:00
5ad6c6bd7f Use correct path to CMake bin directory, take 2 2015-03-04 07:51:09 -08:00
85ef48cb6d Use correct path to CMake bin directory 2015-03-04 07:36:30 -08:00
a6864a7264 Fix CMake installation and enable biicode build 2015-03-04 07:07:13 -08:00
0dd1f19281 Temporarily disable biicode build 2015-03-03 22:24:34 -08:00
7c8f915f0b Sudo make me a sandwich 2015-03-03 22:19:56 -08:00
e1b62a5d39 Install CMake in system dirs 2015-03-03 22:12:37 -08:00
4d208ae86f Install newer version of cmake 2015-03-03 22:07:20 -08:00
29451ea8e2 Update travis config 2015-03-03 21:49:33 -08:00
e6113fb9f5 Rewrite biicode build script in Python and simplify 2015-03-03 21:45:47 -08:00
7c0a23329e Update copyright notices 2015-03-03 21:04:45 -08:00
f1e77e41a5 Update breathe 2015-03-02 08:34:22 -08:00
267d4542bb Remove unnecessary stuff from biicode-build.sh 2015-03-02 07:54:13 -08:00
ee5443e920 Move biicode files to support/biicode 2015-03-02 07:48:57 -08:00
103530d407 Fix formatting 2015-03-01 20:58:45 -08:00
efc42fbd4e Temporary exclude fancy ctor from the docs 2015-03-01 18:25:40 -08:00
7c0d5756ff Fix clang build 2015-03-01 18:19:56 -08:00
91a7ee6c20 Add BasicArrayWriter to docs 2015-03-01 18:10:09 -08:00
74512aa282 Ignore bin directory 2015-03-01 18:09:03 -08:00
beaf6f7436 Add a fixed-size array writer 2015-03-01 18:08:24 -08:00
63b4f0ae1a build.py -> appveyor-build.py 2015-03-01 17:20:22 -08:00
5bea8a649b Move biicode C++ Format sample to support/biicode/sample.cc 2015-03-01 17:12:14 -08:00
2e3423b053 Update compile-test 2015-03-01 17:03:44 -08:00
1244f3d58f Move biicode.cmake to support/cmake 2015-03-01 17:00:53 -08:00
656f0895ed Add readme 2015-03-01 16:48:08 -08:00
5a51aac85e Move biicode build script to support/biicode-build.sh 2015-03-01 16:46:44 -08:00
c3e845ab7e Only enable doc target if breathe is available 2015-03-01 16:35:29 -08:00
ce4d3e175c Fix biicode build 2015-03-01 16:23:47 -08:00
fb86e4f6fa Remove conf.py from .gitignore 2015-03-01 16:16:18 -08:00
da6ac7fb26 Fix tests 2015-03-01 16:12:26 -08:00
07754c047c Place executables in the bin dir 2015-03-01 16:07:18 -08:00
67089022bf Run test commands during CI builds 2015-03-01 15:21:33 -08:00
4df5d10e3c Check if initializer lists are supported 2015-03-01 14:14:06 -08:00
8a915b9b8d Update compile-test 2015-03-01 14:13:45 -08:00
8f1e5df672 Merge branch 'master' of github.com:cppformat/cppformat 2015-03-01 09:43:44 -08:00
c09c42f9a7 Don't do explicit instantiation in the header-only mode 2015-03-01 09:43:33 -08:00
86a7d856fa Update README.rst 2015-02-26 09:05:20 -08:00
391d6430e5 Update README.rst 2015-02-26 08:10:36 -08:00
a8a7534f78 Reorder function declarations
Obey your inner OCD
2015-02-26 06:54:12 -08:00
110d4c0ab0 Replace CharTraits::UnsupportedStrType with WCharHelper::Unsupported 2015-02-26 06:32:00 -08:00
17b9e4db8c Improve error reporting when trying to write wchar_t with a char writer 2015-02-26 06:21:54 -08:00
52f44bf114 Fix clang warning
warning: unknown warning group '-Wdocumentation-unknown-command',
ignored [-Wunknown-pragmas]
2015-02-25 17:32:32 -08:00
fede517b22 Don't define _CRT_SECURE_NO_WARNINGS if it is already defined
This is done to avoid warnings.
2015-02-25 17:20:26 -08:00
c746122623 Remove extra whitespace 2015-02-25 16:23:11 -08:00
ed490145d8 Improve error reporting when trying to format wide char into narrow string 2015-02-25 16:03:00 -08:00
f3fe82415d Merge branch 'master' of github.com:cppformat/cppformat 2015-02-25 09:50:53 -08:00
d5602d9fb6 Remove unnecessary call to convert 2015-02-25 09:50:39 -08:00
7716157bdb Update README.rst 2015-02-25 09:00:31 -08:00
e70af5b99e Merge branch 'better-errors' 2015-02-25 08:00:46 -08:00
f014d32147 Improve error reporting when formatting wide into narrow strings 2015-02-25 07:58:49 -08:00
bf14b2c41b Try improving error reporting
when formatting wide strings into narrow.
2015-02-25 07:43:47 -08:00
f6cffb5eeb Indent 2015-02-25 06:17:12 -08:00
c634a5bf2b Merge branch 'master' of github.com:cppformat/cppformat 2015-02-25 06:16:08 -08:00
f8fd34ac30 Merge pull request #121 from objectx/VC2013
Avoid error C2156 under VC++2013
2015-02-25 06:15:09 -08:00
c2bcb31354 Avoid error C2156 under VC++2013 2015-02-25 20:40:28 +09:00
7215c3446b Break long lines 2015-02-24 16:44:01 -08:00
642b72cd91 Fix StringRef test 2015-02-24 09:52:16 -08:00
89fed501d4 Merge branch 'master' of github.com:cppformat/cppformat 2015-02-24 08:32:12 -08:00
28fd7fb159 Fix formatting (-Gangnam- Google style) 2015-02-24 08:31:56 -08:00
85833c90ee Merge pull request #119 from TrentHouliston/master
Add an install command to the cmake file (to allow make install)
2015-02-24 05:55:46 -08:00
4da1fa391e Add an install command to the cmake file (to allow make install) 2015-02-24 17:31:30 +11:00
de92f5d8a7 Update README.rst 2015-02-22 11:46:58 -08:00
d06ff7a7e8 Fix internal::clzll on Win64 2015-02-22 06:31:55 -08:00
a81baf2904 Merge branch 'master' of github.com:cppformat/cppformat 2015-02-22 06:29:33 -08:00
810c734c3f Merge pull request #118 from CarterLi/master
Emulate _BitScanForward64 on WIN32
2015-02-22 06:29:19 -08:00
524222f094 Win32 doesn't have _BitScanForward64 so emulate it with two 32 bit calls.
Implementation used: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/support/win32/support.h?view=markup#l135
2015-02-22 17:48:19 +08:00
016adee06c Simplify sample 2015-02-21 16:15:47 -08:00
2b35c9e8e7 Move CMake files to support 2015-02-21 16:02:44 -08:00
cbc46d9e78 Use __builtin_clz whenever it is available 2015-02-21 06:21:29 -08:00
e87a24633b Don't use builtin_ in function names as they are not builtins 2015-02-21 06:16:49 -08:00
14eae59c6a Correct FMT_BUILTIN_CLZ definition 2015-02-20 08:58:16 -08:00
2418a84f02 Cleanup 2015-02-20 08:51:01 -08:00
27e0bf72c0 Use correct intrinsics for count_digits 2015-02-20 08:49:06 -08:00
939193be21 Merge pull request #116 from CarterLi/master
Use MSVC intrinsics for better performance
2015-02-20 08:22:06 -08:00
00e3ae508e Use MSVC intrinsics for better performance 2015-02-20 11:19:01 +08:00
bc33d17ce3 Update README.rst 2015-02-19 08:40:40 -08:00
65cd4835cd Update README.rst 2015-02-19 08:26:03 -08:00
53010624a0 Move Windows implementation of print_colored to a separate branch
as it needs further testing.
2015-02-19 07:54:59 -08:00
a92205be9c Remove unused policy setting 2015-02-17 14:42:11 -08:00
a16ca84346 Use mirror 2015-02-17 09:19:49 -08:00
f40f790159 Merge branch 'master' of github.com:cppformat/cppformat 2015-02-17 09:17:21 -08:00
88835f8468 Fix mingw download URL 2015-02-17 09:16:50 -08:00
5b0a9bbe85 Improve StringRef test 2015-02-17 06:45:45 -08:00
6a52fc164a Merge pull request #114 from CarterLi/master
Silence warnings on Windows
2015-02-17 06:39:21 -08:00
b4df6cb2fa Add libstdc++ version 2015-02-17 06:24:40 -08:00
932eb9777e Fix formatting, take 2 2015-02-17 06:15:44 -08:00
4a1974577f Fix formatting 2015-02-17 06:14:32 -08:00
dfad5f1d39 Update README.rst 2015-02-17 06:12:44 -08:00
3f574c1611 Silence warnings on Windows 2015-02-17 10:11:42 +08:00
8d07db0e0e Break long line 2015-02-16 14:33:04 -08:00
bd133382f0 Fix BasicWriter::write without formatting arguments on C++11 (#109) 2015-02-16 14:32:38 -08:00
040b8e7e06 Link to Android NDK 2015-02-16 07:25:45 -08:00
d9ef0e0a44 Minor correction 2015-02-16 07:11:57 -08:00
6c656663f3 Merge branch 'master' of github.com:cppformat/cppformat 2015-02-16 07:09:33 -08:00
291e43abac Add Android NDK section 2015-02-16 07:09:25 -08:00
a85d5e962b Update README.rst 2015-02-15 09:32:13 -08:00
11fab458c4 Merge pull request #107 from newnon/master
Android.mk
2015-02-15 09:12:49 -08:00
829cd70cd2 Merge pull request #112 from CarterLi/master
Detect static assertion support
2015-02-15 08:43:59 -08:00
1d49443405 fix android.mk 2015-02-15 19:21:32 +03:00
9fd566412d Refine 2015-02-15 15:25:56 +08:00
9331533309 Use __GXX_EXPERIMENTAL_CXX0X__ for better C++11 detection 2015-02-15 04:16:23 +01:00
43b9fefbd2 Use static_assert more actively 2015-02-15 03:55:21 +01:00
0fc15d48f3 Merge pull request #111 from CarterLi/master
Use explicitly deleted functions to make types non-copyable
2015-02-14 08:33:37 -08:00
2eef573656 Use explicitly deleted functions to make types non-copyable 2015-02-14 23:22:14 +08:00
f77350f8fa Disable unnecessary CMake check and comment 2015-02-14 06:18:19 -08:00
5282bebbd7 Merge pull request #110 from CarterLi/master
Use throw() when noexcept is not supported
2015-02-14 06:10:11 -08:00
e2583ab5f3 Use throw() when noexcept is not supported 2015-02-14 09:58:29 +08:00
950e6b9753 Fix downloader 2015-02-12 21:34:36 -08:00
c110f7b8d3 Move the code from appveyor config to a Python script
No more PowerShell rubbish, yay!
2015-02-12 17:53:39 -08:00
86fee707fb Update MinGW URL 2015-02-12 16:48:17 -08:00
c643fdae53 Fix CMake warning 2015-02-12 15:55:21 -08:00
609f33c94a Fix appveyor script 2015-02-12 15:41:30 -08:00
2f05eaa07d Correct filename in Biicode config 2015-02-12 15:39:06 -08:00
2ced92529d Move logic from travis.yml to a Python script 2015-02-12 15:34:38 -08:00
dd2e8b98de Fix RST markup 2015-02-12 12:46:28 -08:00
f79c88c190 Android.mk 2015-02-12 23:34:56 +03:00
4f51033aa9 Workaround PowerShell idiocy 2015-02-12 12:27:32 -08:00
503e87f153 Report CMake version for debugging 2015-02-12 11:41:45 -08:00
3822241d99 Use policy check instead of CMake version check 2015-02-12 11:27:55 -08:00
e392eea160 Fix CMake warning 2015-02-12 10:12:26 -08:00
8273855067 Remove extra newline mostly to check for linguist updates 2015-02-12 06:23:58 -08:00
8bd1953094 Minor changes to follow C++ Format's coding conventions 2015-02-11 14:16:22 -08:00
33f85efb55 Merge pull request #104 from franramirez688/master
Adapted to biicode via biicode.conf, ignore.bii and CMakeLists.txt
2015-02-11 14:02:27 -08:00
7b77eb61b5 adapted to biicode via biicode.conf, ignore.bii and CMakeLists.txt; mixed Travis
(original and biicode building)
2015-02-11 22:52:00 +01:00
50151ff804 Update README.rst 2015-02-10 19:37:54 -08:00
4a11f70408 Update README.rst
D'oh.
2015-02-10 19:36:29 -08:00
01b00e6dfb Update README.rst 2015-02-10 19:34:03 -08:00
a32f9148fc Update README.rst 2015-02-10 19:32:33 -08:00
a95b3f7ee1 Update README.rst 2015-02-10 19:31:22 -08:00
04a21bbb2e Merge branch 'fallthrough' of github.com:cppformat/cppformat 2015-02-09 08:02:14 -08:00
618dd9d6af Remove the fallthrough attribute detection 2015-02-09 07:54:03 -08:00
a92c179a6d Fix warnings on clang 2015-02-09 07:37:26 -08:00
267382af39 Revert the experimental fix for print_colored that didn't work 2015-02-09 06:53:05 -08:00
cfd476bb8b Temporarily disable the test as the fix didn't work. 2015-02-08 20:41:13 -08:00
e875e3145f Fix print_colored on Windows 2015-02-08 20:24:07 -08:00
9368b6a4ee Fix error handling in print_colored 2015-02-08 20:06:45 -08:00
7004d1edf6 Update the contributed code to the used coding conventions 2015-02-08 19:54:39 -08:00
d5ab6ba728 Merge pull request #102 from Ryuuke/master
added color support for windows
2015-02-08 18:25:31 -08:00
bc78ca42a9 remove global variables 2015-02-08 23:10:13 +00:00
4806f75469 remove unused define 2015-02-08 16:14:46 +00:00
5a9dc8f991 windows cli colors revision and test case 2015-02-08 16:08:29 +00:00
viz
26c151c5e4 Detect [[clang::fallthrough]] even __has_cpp_attribute is not supported 2015-02-08 07:57:05 -08:00
bce73e2bd8 remove forward enum declaration 2015-02-07 22:47:42 +00:00
51ceef3dee added color support for windows 2015-02-07 22:39:08 +00:00
326ade7698 Document what happens if you pass an invalid error code
to SystemError or WindowsError
2015-02-07 09:46:42 -08:00
502d2ede8a Bump version 2015-02-07 08:53:30 -08:00
81dc04dd48 Update README.rst
Add POL to the list of projects using cppformat
2015-02-07 08:31:17 -08:00
fe2b5351be Merge pull request #101 from cppformat/fallthrough
Try detecting clang::fallthrough using __has_cpp_attribute
2015-02-07 06:57:20 -08:00
d7fea1ba0c Try detecting clang::fallthrough using __has_cpp_attribute
and use it to silence one of the warnings in #96.
2015-02-07 06:51:47 -08:00
37ad436068 Fix by @dixlorenz for clang warnings "'return' will never be executed" (#96) 2015-02-06 21:27:31 -08:00
45d70b71ec Fix by @dixlorenz for clang warning about unknown Doxygen tags 2015-02-06 21:25:30 -08:00
d930f6956f Update README.rst
Add a link to GitHub search for projects using the library
2015-02-06 14:03:44 -08:00
38a7406318 Update README.rst
Add 0 A.D. to the list of projects using C++ Format and reorder projects lexicographically
2015-02-06 13:46:19 -08:00
83f5085551 Remove RTD theme 2015-02-06 09:01:49 -08:00
554abb12f1 Fix formatting 2015-02-06 08:45:43 -08:00
f2c16957f7 Provide examples of using SystemError and WindowsError (#54) 2015-02-06 08:43:02 -08:00
48e6df117a Merge branch 'master' of github.com:cppformat/cppformat 2015-02-06 07:27:29 -08:00
59254410da Fix a warning (#95) 2015-02-06 07:27:19 -08:00
58a300c82a Merge pull request #98 from MariadeAnton/master
Update README.rst
2015-02-06 07:07:14 -08:00
710817befb Update README.rst
Added biicode badge
2015-02-06 15:19:30 +01:00
ba17cca432 Fix link 2015-02-05 11:18:16 -08:00
f82f4bd79b Merge branch 'master' of github.com:cppformat/cppformat 2015-02-05 11:16:47 -08:00
589b73f646 Update links 2015-02-05 11:16:39 -08:00
afba2422ae Fix packaging 2015-02-05 08:50:47 -08:00
58683f5376 Version 1.0 🎆 2015-02-05 08:42:25 -08:00
bc6fcd90cf Fix CSS 2015-02-05 08:41:19 -08:00
402f5f3178 Documentation fixes 2015-02-05 08:36:46 -08:00
bdeffc3fdc Fix build on Android NDK
where XSI-compliant version of strerror_r is used violating the docs at
http://linux.die.net/man/3/strerror_r
2015-02-05 07:04:22 -08:00
b4eef59100 Only add the doc target if doxygen and sphinx-build are available 2015-01-30 12:53:52 -08:00
90bc8dd3ed Don't track the dependencies of the doc target as Sphinx does it itself 2015-01-30 08:49:48 -08:00
237eaa53e1 Replace exclude_trees with exclude_patterns
exclude_trees was removed in Sphinx 1.3b1
2015-01-30 07:15:00 -08:00
531ee615af Switch to the main breathe repo 2015-01-21 14:46:29 -08:00
fae27d262c Switch to the main breathe repo 2015-01-21 14:44:05 -08:00
0bd32f3f29 Merge branch 'master' of github.com:cppformat/cppformat 2015-01-08 07:56:19 -08:00
43aebf51d6 Allow precision specifier for non-float arguments 2015-01-08 07:56:08 -08:00
757a523195 Merge pull request #89 from mparaniak/master
Add format linking to tests
2015-01-06 09:12:37 -08:00
7f706171a9 Add format linking to tests 2015-01-06 16:57:07 +01:00
cd828a8691 Add a test for https://github.com/cppformat/cppformat/issues/86 2015-01-05 07:16:26 -08:00
6080108802 Merge pull request #87 from aruhan/issue/86
Fix format using wostream produces wrong results
2015-01-05 07:13:04 -08:00
e8febf7f4b Fix format using wostream produces wrong results 2015-01-05 22:33:18 +09:00
130bccbcbf Update README.rst 2014-12-19 07:50:41 -08:00
01414ac6ec Update README.rst 2014-12-19 07:49:54 -08:00
3cb004d0d3 Update README.rst 2014-12-19 07:48:38 -08:00
a7d7e0daec Restore bootstrap theme 2014-12-19 07:42:46 -08:00
67e196eac4 Make test libraries static 2014-12-19 07:39:13 -08:00
fdecd5b40f Remove FMT_SHARED in favor of BUILD_SHARED_LIBS 2014-12-19 07:37:49 -08:00
a8b1769803 Use default namespace 2014-12-18 08:46:25 -08:00
8d89e56d2c Set primary domain to cpp 2014-12-18 08:36:53 -08:00
fb12cfd196 Suppress more bogus warnings 2014-12-17 06:53:32 -08:00
ecd2b80e8f Get rid of using declarations for header-only config 2014-12-17 06:42:26 -08:00
c95908bd8c Disable bogus MSVC warnings 2014-12-17 06:41:21 -08:00
c630d1f236 Disable "secure" warnings in posix. 2014-12-16 07:07:09 -08:00
0d1eb8b1ea Don't undefine "secure" warnings 2014-12-16 07:02:59 -08:00
dff2137405 Don't define/undefine macros without FMT_ prefix 2014-12-16 07:01:01 -08:00
2523f3b939 Fix more -Wshadow warnings 2014-12-10 07:24:05 -08:00
f9fc8fd09d Fix -Wshadow warnings 2014-12-09 07:45:54 -08:00
b49a1b4a52 Fix linkage errors on Windows in header-only config 2014-12-09 06:32:07 -08:00
df580969f7 Add a test for header-only configuration 2014-12-09 06:22:55 -08:00
f9c3ff244d Merge branch 'header-only' of github.com:cppformat/cppformat 2014-12-09 06:14:04 -08:00
6e3d7d9a6a Update README.rst
Add spdlog
2014-12-08 06:15:31 -08:00
54f19ff7b2 Simplify append_float_length 2014-12-03 06:33:31 -08:00
f3bd9d4241 Remove extra space 2014-12-03 06:20:12 -08:00
6f3c095ed6 Use FMT_DISALLOW_COPY_AND_ASSIGN instead of undefined assignment operators 2014-12-03 06:16:52 -08:00
0fea89ec8f Merge pull request #81 from Queueless/master
Fixed Level 4 warnings on Windows
2014-12-03 06:04:06 -08:00
7706e1054d Update README.rst
Fix formatting
2014-12-02 12:55:13 -08:00
a23fbbb9a3 Update README.rst
Add Analytics Cloud to the list of projects using C++ Format.
Source: https://help.salesforce.com/servlet/servlet.FileDownload?file=015300000035w3yAAA
2014-12-02 12:54:12 -08:00
838dc1e189 move append_float_length specialization to the header 2014-12-02 10:20:27 -05:00
820c03a473 Update README.rst
Add readpe to projects using cppformat
2014-12-02 06:39:16 -08:00
311251eb91 Complete header-only configuration support 2014-11-29 06:58:00 -08:00
c2a6903e19 Define FMT_FUNC to nothing if FMT_HEADER_ONLY is not defined 2014-11-28 15:30:03 -08:00
d9c605c61f Initial support for header-only configuration 2014-11-28 06:40:57 -08:00
334fc54b5d removed unused code 2014-11-25 18:03:54 -05:00
bd0067ee76 made code compile under windows with level 4 warnings 2014-11-25 18:01:09 -05:00
4c59aa8780 Link to stable docs 2014-11-24 16:20:07 -08:00
aca49379a5 Fix a few minor issues detected by CppCheck
Thanks to Dmitry Andriyankov for reporting.
2014-11-24 07:38:26 -08:00
615c1eef6b Fix error handling in fmt::fprintf. 2014-11-14 09:40:01 -08:00
8ea9f068c7 Convert tabs to spaces 2014-11-07 07:58:49 -08:00
97ea39cf79 Remove no longer needed highlight directives 2014-11-07 07:26:04 -08:00
43d3c0a110 Set highlight language to c++ in config 2014-11-07 07:24:51 -08:00
f02e4100db Undo highlight since it's not working and simplify markup 2014-11-07 07:04:03 -08:00
e41ca7b951 Try setting highlight to c++ 2014-11-07 06:56:53 -08:00
6527551d43 Simplify markup 2014-11-05 07:39:34 -08:00
9cbb25e43f Simplify markup 2014-11-05 07:36:55 -08:00
10698cc44d Update theme 2014-11-04 08:31:07 -08:00
aa78f6155b Add theme alias 2014-11-04 08:17:59 -08:00
6bcfb377b2 Link to docs 2014-11-04 07:44:07 -08:00
bbd7681a33 Add ReadTheDocs badge 2014-11-04 07:42:56 -08:00
8f93e84a1a Switch to ReadTheDocs theme 2014-11-04 07:37:25 -08:00
ed92af29b3 Add missing ')' 2014-10-30 13:58:16 -07:00
14984acd27 Fix UTF conversion tests 2014-10-30 13:00:44 -07:00
daca48cb15 Fix MSVC build 2014-10-30 12:20:08 -07:00
cabe5bddb4 Fix util-test 2014-10-30 08:07:28 -07:00
5a5870d3ca n -> size 2014-10-30 07:10:43 -07:00
5c4b6678e4 Compute StringRef size in ctor 2014-10-30 07:05:42 -07:00
10d83aaa52 Test that StringRef size computation 2014-10-30 06:27:44 -07:00
d5a6316d5c Update breathe 2014-10-25 10:27:49 -07:00
9501ca0e68 Update theme 2014-10-24 07:43:53 -07:00
06ae9a6de0 Update breathe 2014-10-24 07:09:56 -07:00
c50e7781fc Remove old bootstrap theme 2014-10-24 07:09:46 -07:00
e3263a341e Update theme 2014-10-23 07:25:54 -07:00
adca25913c Indent descriptions of macros 2014-10-23 07:22:37 -07:00
99ff512b32 Use sphinx bootstrap theme from subproject 2014-10-23 07:17:56 -07:00
0019793786 Add bootstrap theme as a module 2014-10-21 08:28:27 -07:00
e640e458c1 Align navbar content with the main content 2014-10-20 08:56:27 -07:00
fb6ed7590b Align footer with the main content 2014-10-17 09:39:43 -07:00
e9bf788bd5 Add side margins if screen is too wide 2014-10-17 09:20:21 -07:00
4a818ac785 Move CSS override to theme because RTD ignores layout.html
RTD bug: https://github.com/rtfd/readthedocs.org/issues/152
2014-10-17 09:15:47 -07:00
c90c6805a2 Add side margins if screen is too wide 2014-10-17 07:53:56 -07:00
7d2c3ac0f2 Add styles 2014-10-17 07:24:49 -07:00
32392597aa Move Usage section to a separate file 2014-10-16 07:12:43 -07:00
2b17d47372 Merge branch 'master' of github.com:cppformat/cppformat 2014-10-16 06:51:04 -07:00
ca94e4d27f Update breathe 2014-10-16 06:50:48 -07:00
c752b6d489 Merge pull request #78 from amorozov/issue/76
sign-compare warnings fixes
2014-10-14 06:46:20 -07:00
4d3126c567 sign-compare warnings fixes 2014-10-14 03:28:47 +07:00
755ecb0311 Fix warnings 2014-10-13 08:39:38 -07:00
d707adce5c Fix warning in clang 2014-10-13 06:59:18 -07:00
0d732cf5d3 Merge branch 'master' of github.com:cppformat/cppformat 2014-10-13 06:46:17 -07:00
5189274797 Fix warnings 2014-10-13 06:46:07 -07:00
73ec6504c7 Update README.rst 2014-10-12 14:18:17 -07:00
88f3f53870 Fix Sphinx config 2014-10-10 08:47:36 -07:00
709465197a Switch to bootstrap theme 2014-10-10 08:40:35 -07:00
76a2ea56ce Add bootstrap Sphinx theme 2014-10-10 08:39:54 -07:00
a7520f164a Restore theme 2014-10-10 06:18:50 -07:00
bb1926753d Try using the default theme 2014-10-10 06:10:52 -07:00
f05e856017 Fix example 2014-10-09 11:25:39 -07:00
4865950649 Update links 2014-10-09 09:10:12 -07:00
8cab5909e0 Improve PDF output 2014-10-09 07:57:26 -07:00
80f5cbb9e5 Add missing quote 2014-10-09 07:57:03 -07:00
833fd47f83 Change the next version number to 0.12.0 2014-10-06 08:49:33 -07:00
8b76e97062 Support compilation with exceptions disabled 2014-10-06 08:30:55 -07:00
55c61d1abd Update project name 2014-10-06 08:27:42 -07:00
b6afd93879 Split long line 2014-10-06 08:20:52 -07:00
1e63fc7ca0 Comment 2014-10-05 09:34:46 -07:00
32c5dca733 Update breathe 2014-10-03 07:14:56 -07:00
43b389f358 Update README.rst 2014-10-02 06:44:34 -07:00
fae3ae67b9 Fix util-test 2014-10-01 09:32:31 -07:00
ae413ebf7a Add a section on custom allocators 2014-10-01 08:49:20 -07:00
04d38a8b14 Update docs 2014-10-01 08:32:01 -07:00
03f7f99f4c Fix build on pre-C++11 compilers 2014-10-01 08:24:47 -07:00
8b9a6e03f6 Test buffer 2014-10-01 08:12:10 -07:00
74dc571ba0 Support signed char and unsigned char strings 2014-09-30 08:15:56 -07:00
98a25ec7cb Test Buffer 2014-09-30 07:30:27 -07:00
313b259891 Use type_traits to test if copyable/assignable
Replace compile tests that check if types are copy constructible and copy assignable with normal tests that use type_traits (if available).
2014-09-30 07:30:05 -07:00
d00f689c40 Fix type_traits check 2014-09-29 11:03:18 -07:00
b79d06a5da Escape quotes 2014-09-29 10:44:48 -07:00
2846a9eb38 Check if is_copy_assignable is working
is_copy_assignable is broken in MSVC.
2014-09-29 10:42:16 -07:00
810f42c0c7 Fix util-test on Windows, take 2 2014-09-29 09:59:49 -07:00
55a16eaec7 Fix util-test on Windows 2014-09-29 09:37:33 -07:00
a309c4bbed Fix posix-test on Windows 2014-09-29 09:28:44 -07:00
e1c046c984 Fix open check 2014-09-29 09:27:32 -07:00
8c4db5081b Fix Windows build 2014-09-29 09:17:02 -07:00
dd90129066 Check if type_traits actually work. 2014-09-29 09:15:41 -07:00
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
5ca3d00e26 Mind the lifetime 2014-09-25 12:15:16 -07:00
a9da3d3852 Fix ArgList::operator[] 2014-09-25 09:31:36 -07:00
b2bd63d2d9 Test ArgList 2014-09-25 09:11:51 -07:00
65cb43a484 Store type info in uint64_t instead of ULongLong 2014-09-25 07:42:29 -07:00
c2f02df2f5 Fix warning in clang 2014-09-25 07:38:16 -07:00
f43caef311 Fix linkage 2014-09-25 07:21:48 -07:00
098a8fdef8 Simplify make_type 2014-09-25 07:14:08 -07:00
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
163178eee1 Make print non-inline 2014-09-25 07:08:25 -07:00
ae8bc36e57 MakeArg -> MakeValue 2014-09-24 08:07:50 -07:00
93b314d3ab Comments 2014-09-24 07:59:23 -07:00
ec1aea34e6 Refactor type processing 2014-09-24 07:48:45 -07:00
ab6e759291 pointer_value -> pointer 2014-09-23 08:21:58 -07:00
d2973766ea ArgBase -> Value 2014-09-23 08:11:03 -07:00
beb00edf73 Store types in ArgList instead of Arg 2014-09-23 07:59:43 -07:00
49222dc0c7 Improve allocator test 2014-09-23 07:58:23 -07:00
13bbb0db7a Update docs 2014-09-21 14:12:21 -07:00
eac25ad1c7 Update readme 2014-09-21 08:13:35 -07:00
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
14f2577569 Fix linkage 2014-09-19 08:45:05 -07:00
b9a568b1dd Add support for custom memory allocator to BasicWriter 2014-09-19 07:51:42 -07:00
70205edd6e Fix build with ancient CMake 2014-09-18 09:29:51 -07:00
a734f67978 Check if variadic templates are working 2014-09-18 09:18:18 -07:00
6a98f42336 Add support for custom allocators 2014-09-18 09:07:40 -07:00
a4998accf6 Fix travis build 2014-09-17 08:26:07 -07:00
c76b22405d Replace GTest with GMock (includes GTest) 2014-09-17 08:01:42 -07:00
2938a92d64 Add KBEngine to projects that use cppformat 2014-09-13 08:44:49 -07:00
b54d6e7124 Fix posix-test, take 3. 2014-09-12 18:22:45 -07:00
94daf27c9d Fix posix-test, take 2. 2014-09-12 17:41:04 -07:00
886ad20a9d Remove unused size argument from Array's ctor. 2014-09-12 17:20:36 -07:00
434e83a192 Fix posix-test. 2014-09-12 17:16:22 -07:00
ddd95965e1 Fix MaxSize test. 2014-09-12 16:52:15 -07:00
a3062f6647 Disambiguate a call 2014-09-12 16:18:04 -07:00
352b6ae496 Workaround more Windows crap. 2014-09-12 15:18:11 -07:00
74169e4b5d Add a portable getpagesize() implementation 2014-09-12 13:53:52 -07:00
1e9ca17b9d Workaround Windows crap. 2014-09-12 13:42:22 -07:00
225b757b50 Handy fix for handling of handles. 2014-09-12 12:37:32 -07:00
cb7caa540f Move FMT_STATIC_ASSERT to header and test. 2014-09-12 12:05:32 -07:00
ea9989b254 Add missing include. 2014-09-12 11:57:33 -07:00
949c3c5df4 Test if File::size can handle maximum file size. 2014-09-12 11:12:22 -07:00
e34e9fa0c7 Add File::size and make File's ctor take StringRef. 2014-09-12 10:50:16 -07:00
f175591923 Return size_t instead of streamsize in File::read and File::write
File::read and File::write throw exception on error, so they don't need to return a negative value to indicate error.
2014-09-12 09:38:37 -07:00
6cd9be2c06 Bump version. 2014-09-12 08:29:38 -07:00
3269fce2dc Fix https://github.com/cppformat/cppformat/issues/61 2014-09-12 08:27:23 -07:00
d59fbdcd4a Increase the maximum number of formatting arguments on compilers without variadic templates to 15. 2014-09-11 21:18:36 -07:00
445663fade Fix windows build. 2014-09-05 10:56:00 -07:00
f2c9df8e9f Move safe_strerror to anonymous namespace. 2014-09-05 08:44:41 -07:00
b33d2aa825 Workaround Windows braindamage. 2014-09-05 08:06:07 -07:00
88e0db8486 Test format_error_code. 2014-09-05 08:04:26 -07:00
d4916d9271 Add missing file. 2014-09-05 07:35:00 -07:00
fe9888a1e2 Move implementation tests to format-impl-test. 2014-09-05 07:12:20 -07:00
93bcad6d8e Fix Windows build. 2014-09-03 08:10:20 -07:00
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
82d4d11c11 format -> cppformat 2014-08-29 09:18:53 -07:00
5debb2aa86 Refactor error reporting to reduce duplication. 2014-08-29 08:16:10 -07:00
605d2600f8 Improve error reporting. 2014-08-29 07:45:55 -07:00
271fa8c908 Improve handling of format strings in custom arguments. 2014-08-29 07:23:54 -07:00
3947a7a98c Move check_sign to anonymous namespace. 2014-08-29 06:57:53 -07:00
ab35af53c5 Check result of fread. 2014-08-29 06:57:26 -07:00
e62354a190 Fix build. 2014-08-28 14:51:01 -07:00
eab0b577f8 Report filename in exception. 2014-08-28 13:42:07 -07:00
e44619707e Fix Windows build. 2014-08-28 12:46:30 -07:00
2dad1690c8 Fix BufferefFile test on Windows. 2014-08-28 12:13:03 -07:00
564da25932 Add ctor & print method to BufferedFile. 2014-08-28 11:53:05 -07:00
108cd1d1a0 Fix anchor. 2014-08-28 10:18:13 -07:00
32344d9b14 Comment 2014-08-28 08:11:21 -07:00
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
56fc525e98 Get rid of FormatterBase::error_. 2014-08-28 07:48:55 -07:00
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
526b7fc91d Throw exception in parse_nonnegative_int if the number is too big. 2014-08-28 06:42:59 -07:00
9646e38c3b Don't use error_ in parse_arg_index. 2014-08-27 09:13:42 -07:00
da0f7c0a51 Improve error reporting in parse_arg_index. 2014-08-27 09:04:51 -07:00
42de4f1f7d Get rid of FormatErrorReporter. 2014-08-27 08:24:31 -07:00
8cc0d21124 Move the Crash Reporter fix to Google Test where it belongs. 2014-08-23 10:25:21 -07:00
59a462c67d Make sure that Crash Reporter is not invoked on death tests. 2014-08-23 10:04:06 -07:00
214 changed files with 60009 additions and 9158 deletions

8
.clang-format Normal file
View File

@ -0,0 +1,8 @@
# Run manually to reformat a file:
# clang-format -i --style=file <file>
Language: Cpp
BasedOnStyle: Google
IndentPPDirectives: AfterHash
IndentCaseLabels: false
AlwaysBreakTemplateDeclarations: false
DerivePointerAlignment: false

6
.github/pull_request_template.md vendored Normal file
View File

@ -0,0 +1,6 @@
<!-- Please read the contribution guidelines before submitting a pull request. -->
<!-- By submitting this pull request, you agree that your contributions are licensed under the {fmt} license,
and agree to future changes to the licensing. -->
<!-- If you're a first-time contributor, please acknowledge it by leaving the statement below. -->
I agree that my contributions are licensed under the {fmt} license, and agree to future changes to the licensing.

25
.gitignore vendored
View File

@ -1,17 +1,34 @@
.vscode/
*.iml
.idea/
.externalNativeBuild/
.gradle/
gradle/
gradlew*
local.properties
build/
bin/
/_CPack_Packages /_CPack_Packages
/doc/conf.py /CMakeScripts
/doc/doxyxml /doc/doxyxml
/doc/html /doc/html
virtualenv
/Testing /Testing
/*-test
/install_manifest.txt /install_manifest.txt
/tinyformat_speed_test
*~ *~
*.a *.a
*.so*
*.xcodeproj
*.zip *.zip
cmake_install.cmake cmake_install.cmake
CPack*Config.cmake CPack*.cmake
fmt-*.cmake
CTestTestfile.cmake CTestTestfile.cmake
CMakeCache.txt CMakeCache.txt
CMakeFiles CMakeFiles
FMT.build
Makefile Makefile
run-msbuild.bat
fmt.pc

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "breathe"]
path = breathe
url = git://github.com/vitaut/breathe.git

View File

@ -1,23 +1,140 @@
language: cpp language: cpp
dist: trusty
sudo: false
os: os: linux
- linux
- osx
before_install: git:
- if [ $TRAVIS_OS_NAME == osx ]; then curl http://www.cmake.org/files/v2.8/cmake-2.8.12.2-Darwin64-universal.tar.gz -o cmake.tar.gz; fi depth: 1
- if [ $TRAVIS_OS_NAME == osx ]; then tar xzf cmake.tar.gz; fi
- if [ $TRAVIS_OS_NAME == osx ]; then export PATH=$PATH:"cmake-2.8.12.2-Darwin64-universal/CMake 2.8-12.app/Contents/bin"; fi
- git submodule update --init
env: env:
- BUILD_TYPE=Debug global:
- BUILD_TYPE=Release - secure: |-
a1eovNn4uol9won7ghr67eD3/59oeESN+G9bWE+ecI1V6yRseG9whniGhIpC/YfMW/Qz5I
5sxSmFjaw9bxCISNwUIrL1O5x2AmRYTnFcXk4dFsUvlZg+WeF/aKyBYCNRM8C2ndbBmtAO
o1F2EwFbiso0EmtzhAPs19ujiVxkLn4=
matrix:
include:
# Documentation
- env: BUILD=Doc
sudo: required
# g++ 6 on Linux with C++14
- env: COMPILER=g++-6 BUILD=Debug STANDARD=14
compiler: gcc
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
- env: COMPILER=g++-6 BUILD=Release STANDARD=14
compiler: gcc
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
# g++ 8 on Linux with C++17
- env: COMPILER=g++-8 BUILD=Debug STANDARD=17
compiler: gcc
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
- env: COMPILER=g++-8 BUILD=Release STANDARD=17
compiler: gcc
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
# Apple clang on OS X with C++14
- env: BUILD=Debug STANDARD=14
compiler: clang
os: osx
- env: BUILD=Release STANDARD=14
compiler: clang
os: osx
# clang 6.0 on Linux with C++14 (builds the fuzzers as well)
- env: COMPILER=clang++-6.0 BUILD=Debug STANDARD=14 ENABLE_FUZZING=1
compiler: clang
addons:
apt:
update: true
packages:
- clang-6.0
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty
- llvm-toolchain-trusty-6.0
# clang 4.0 on Linux with C++14
- env: COMPILER=clang++-4.0 BUILD=Debug STANDARD=11
compiler: clang
addons:
apt:
update: true
packages:
- clang-4.0
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty
- llvm-toolchain-trusty-4.0
# g++ 4.8 on Linux with C++11
- env: COMPILER=g++-4.8 BUILD=Debug STANDARD=11
compiler: gcc
- name: Android NDK (Gradle)
language: android
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- ninja-build
- curl
- tree
android:
components:
- tools
- platform-tools
- android-25 # 7.0
- android-27 # 8.1
- android-28 # 9.0
- build-tools-28.0.3
before_install:
# Install Gradle from https://sdkman.io/
- curl -s "https://get.sdkman.io" | bash > /dev/null
- source "$HOME/.sdkman/bin/sdkman-init.sh"
- sdk version
- sdk install gradle
- sdk use gradle
- gradle --version
install:
# Accept SDK Licenses + Install NDK
- yes | sdkmanager --update > /dev/null 2>&1
- sdkmanager ndk-bundle > /dev/null 2>&1
before_script:
- pushd ./support
script:
- gradle clean
- gradle assemble
after_success:
- popd;
- tree ./libs
before_script:
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then export CXX=${COMPILER}; fi
- if [[ "${BUILD}" != "Doc" ]]; then ${CXX} --version; fi
script: script:
- cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DFMT_EXTRA_TESTS=ON . - support/travis-build.py
- make -j4
- CTEST_OUTPUT_ON_FAILURE=1 make test
after_failure:
- cat Testing/Temporary/LastTest.log

View File

@ -1,36 +1,122 @@
cmake_minimum_required(VERSION 2.6) cmake_minimum_required(VERSION 3.1.0)
# Use newer policies if available, up to most recent tested version of CMake.
if(${CMAKE_VERSION} VERSION_LESS 3.11)
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
else()
cmake_policy(VERSION 3.11)
endif()
# Determine if fmt is built as a subproject (using add_subdirectory)
# or if it is the master project.
set(MASTER_PROJECT OFF)
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(MASTER_PROJECT ON)
message(STATUS "CMake version: ${CMAKE_VERSION}")
endif ()
# Joins arguments and places the results in ${result_var}.
function(join result_var)
set(result )
foreach (arg ${ARGN})
set(result "${result}${arg}")
endforeach ()
set(${result_var} "${result}" PARENT_SCOPE)
endfunction()
# Set the default CMAKE_BUILD_TYPE to Release. # Set the default CMAKE_BUILD_TYPE to Release.
# This should be done before the project command since the latter can set # This should be done before the project command since the latter can set
# CMAKE_BUILD_TYPE itself (it does so for nmake). # CMAKE_BUILD_TYPE itself (it does so for nmake).
if (NOT CMAKE_BUILD_TYPE) if (MASTER_PROJECT AND NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING join(doc "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or "
"Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.") "CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
set(CMAKE_BUILD_TYPE Release CACHE STRING ${doc})
endif () endif ()
option(FMT_EXTRA_TESTS "Enable extra tests." OFF) option(FMT_USE_TEXT "Use the text library." OFF)
project(FORMAT) option(FMT_PEDANTIC "Enable extra warnings and expensive tests." OFF)
option(FMT_WERROR "Halt the compilation with an error on compiler warnings."
OFF)
# Options that control generation of various targets.
option(FMT_DOC "Generate the doc target." ${MASTER_PROJECT})
option(FMT_INSTALL "Generate the install target." ${MASTER_PROJECT})
option(FMT_TEST "Generate the test target." ${MASTER_PROJECT})
option(FMT_FUZZ "Generate the fuzz target." OFF)
project(FMT CXX)
# Get version from core.h
file(READ include/fmt/core.h core_h)
if (NOT core_h MATCHES "FMT_VERSION ([0-9]+)([0-9][0-9])([0-9][0-9])")
message(FATAL_ERROR "Cannot get FMT_VERSION from core.h.")
endif ()
# Use math to skip leading zeros if any.
math(EXPR CPACK_PACKAGE_VERSION_MAJOR ${CMAKE_MATCH_1})
math(EXPR CPACK_PACKAGE_VERSION_MINOR ${CMAKE_MATCH_2})
math(EXPR CPACK_PACKAGE_VERSION_PATCH ${CMAKE_MATCH_3})
join(FMT_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.
${CPACK_PACKAGE_VERSION_PATCH})
message(STATUS "Version: ${FMT_VERSION}")
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}") message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
include(CheckCXXCompilerFlag) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
check_cxx_compiler_flag(-std=c++11 HAVE_STD_CPP11_FLAG)
if (HAVE_STD_CPP11_FLAG)
set(CPP11_FLAG -std=c++11)
else ()
check_cxx_compiler_flag(-std=c++0x HAVE_STD_CPP0X_FLAG)
if (HAVE_STD_CPP0X_FLAG)
set(CPP11_FLAG -std=c++0x)
endif ()
endif ()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
"${CMAKE_CURRENT_SOURCE_DIR}/cmake") "${CMAKE_CURRENT_SOURCE_DIR}/support/cmake")
if (CMAKE_GENERATOR MATCHES "Visual Studio") include(cxx14)
include(CheckCXXCompilerFlag)
set(FMT_REQUIRED_FEATURES cxx_auto_type cxx_variadic_templates)
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set(PEDANTIC_COMPILE_FLAGS -pedantic-errors -Wall -Wextra -pedantic
-Wold-style-cast -Wundef
-Wredundant-decls -Wwrite-strings -Wpointer-arith
-Wcast-qual -Wformat=2 -Wmissing-include-dirs
-Wcast-align -Wnon-virtual-dtor
-Wctor-dtor-privacy -Wdisabled-optimization
-Winvalid-pch -Woverloaded-virtual
-Wconversion
-Wno-ctor-dtor-privacy -Wno-format-nonliteral -Wno-shadow)
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6)
set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wnoexcept
-Wno-dangling-else -Wno-unused-local-typedefs)
endif ()
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wdouble-promotion
-Wtrampolines -Wzero-as-null-pointer-constant -Wuseless-cast
-Wvector-operation-performance -Wsized-deallocation)
endif ()
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wshift-overflow=2
-Wnull-dereference -Wduplicated-cond)
endif ()
set(WERROR_FLAG -Werror)
endif ()
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(PEDANTIC_COMPILE_FLAGS -Wall -Wextra -pedantic -Wconversion
-Wno-sign-conversion)
check_cxx_compiler_flag(-Wzero-as-null-pointer-constant HAS_NULLPTR_WARNING)
if (HAS_NULLPTR_WARNING)
set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS}
-Wzero-as-null-pointer-constant)
endif ()
set(WERROR_FLAG -Werror)
endif ()
if (MSVC)
set(PEDANTIC_COMPILE_FLAGS /W3)
set(WERROR_FLAG /WX)
endif ()
if (MASTER_PROJECT AND CMAKE_GENERATOR MATCHES "Visual Studio")
# If Microsoft SDK is installed create script run-msbuild.bat that # If Microsoft SDK is installed create script run-msbuild.bat that
# calls SetEnv.cmd to to set up build environment and runs msbuild. # calls SetEnv.cmd to set up build environment and runs msbuild.
# It is useful when building Visual Studio projects with the SDK # It is useful when building Visual Studio projects with the SDK
# toolchain rather than Visual Studio. # toolchain rather than Visual Studio.
include(FindSetEnv) include(FindSetEnv)
@ -38,83 +124,191 @@ if (CMAKE_GENERATOR MATCHES "Visual Studio")
set(MSBUILD_SETUP "call \"${WINSDK_SETENV}\"") set(MSBUILD_SETUP "call \"${WINSDK_SETENV}\"")
endif () endif ()
# Set FrameworkPathOverride to get rid of MSB3644 warnings. # Set FrameworkPathOverride to get rid of MSB3644 warnings.
set(netfxpath "C:\\Program Files\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.0")
file(WRITE run-msbuild.bat " file(WRITE run-msbuild.bat "
${MSBUILD_SETUP} ${MSBUILD_SETUP}
${CMAKE_MAKE_PROGRAM} -p:FrameworkPathOverride=\"C:\\Program Files\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.0\" %*") ${CMAKE_MAKE_PROGRAM} -p:FrameworkPathOverride=\"${netfxpath}\" %*")
endif () endif ()
option(FMT_SHARED "Build shared library instead of static one" OFF) set(strtod_l_headers stdlib.h)
if (FMT_SHARED) if (APPLE)
set(shared SHARED) set(strtod_l_headers ${strtod_l_headers} xlocale.h)
endif () endif ()
set(FMT_SOURCES format.cc format.h)
include(CheckSymbolExists) include(CheckSymbolExists)
if (WIN32) if (WIN32)
check_symbol_exists(open io.h HAVE_OPEN) check_symbol_exists(open io.h HAVE_OPEN)
check_symbol_exists(_strtod_l "${strtod_l_headers}" HAVE_STRTOD_L)
else () else ()
check_symbol_exists(open fcntl.h HAVE_OPEN) check_symbol_exists(open fcntl.h HAVE_OPEN)
check_symbol_exists(strtod_l "${strtod_l_headers}" HAVE_STRTOD_L)
endif () endif ()
function(add_headers VAR)
set(headers ${${VAR}})
foreach (header ${ARGN})
set(headers ${headers} include/fmt/${header})
endforeach()
set(${VAR} ${headers} PARENT_SCOPE)
endfunction()
# Define the fmt library, its includes and the needed defines.
add_headers(FMT_HEADERS chrono.h color.h compile.h core.h format.h format-inl.h
locale.h ostream.h printf.h ranges.h
safe-duration-cast.h)
set(FMT_SOURCES src/format.cc)
if (HAVE_OPEN) if (HAVE_OPEN)
add_definitions(-DFMT_USE_FILE_DESCRIPTORS=1) add_headers(FMT_HEADERS posix.h)
set(FMT_SOURCES ${FMT_SOURCES} posix.cc posix.h) set(FMT_SOURCES ${FMT_SOURCES} src/posix.cc)
endif () endif ()
add_library(format ${shared} ${FMT_SOURCES}) if (FMT_USE_TEXT)
if (CMAKE_COMPILER_IS_GNUCXX) set(FMT_SOURCES ${FMT_SOURCES} src/text/grapheme_break.cpp)
set_target_properties(format PROPERTIES COMPILE_FLAGS
"-Wall -Wextra -pedantic")
endif ()
if (CPP11_FLAG AND FMT_EXTRA_TESTS)
set_target_properties(format PROPERTIES COMPILE_FLAGS ${CPP11_FLAG})
# Test compilation with default flags.
file(GLOB src RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} test/*.cc test/*.h)
add_library(testformat ${FMT_SOURCE_FILES} ${src})
endif () endif ()
add_subdirectory(doc) add_library(fmt ${FMT_SOURCES} ${FMT_HEADERS} README.rst ChangeLog.rst)
add_library(fmt::fmt ALIAS fmt)
include_directories(.) if (HAVE_STRTOD_L)
target_compile_definitions(fmt PUBLIC FMT_LOCALE)
# We compile Google Test ourselves instead of using pre-compiled libraries.
# See the Google Test FAQ "Why is it not recommended to install a
# pre-compiled copy of Google Test (for example, into /usr/local)?"
# at http://code.google.com/p/googletest/wiki/FAQ for more details.
# GTest doesn't detect <tuple> with clang.
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_definitions(-DGTEST_USE_OWN_TR1_TUPLE=1)
endif () endif ()
add_library(gtest gtest/gtest-all.cc) if (FMT_WERROR)
find_package(Threads) target_compile_options(fmt PRIVATE ${WERROR_FLAG})
target_link_libraries(gtest ${CMAKE_THREAD_LIBS_INIT}) endif ()
if (FMT_PEDANTIC)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") target_compile_options(fmt PRIVATE ${PEDANTIC_COMPILE_FLAGS})
add_definitions(-DGTEST_USE_OWN_TR1_TUPLE=1)
endif () endif ()
enable_testing() target_compile_features(fmt INTERFACE ${FMT_REQUIRED_FEATURES})
add_subdirectory(test)
if (EXISTS .gitignore) target_include_directories(fmt PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
if (FMT_USE_TEXT)
target_include_directories(fmt PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/text>)
endif ()
set_target_properties(fmt PROPERTIES
VERSION ${FMT_VERSION} SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}
DEBUG_POSTFIX d)
if (BUILD_SHARED_LIBS)
if (UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
# Fix rpmlint warning:
# unused-direct-shlib-dependency /usr/lib/libformat.so.1.1.0 /lib/libm.so.6.
target_link_libraries(fmt -Wl,--as-needed)
endif ()
target_compile_definitions(fmt PRIVATE FMT_EXPORT INTERFACE FMT_SHARED)
endif ()
if (FMT_SAFE_DURATION_CAST)
target_compile_definitions(fmt PUBLIC FMT_SAFE_DURATION_CAST)
endif()
add_library(fmt-header-only INTERFACE)
add_library(fmt::fmt-header-only ALIAS fmt-header-only)
target_compile_definitions(fmt-header-only INTERFACE FMT_HEADER_ONLY=1)
target_compile_features(fmt-header-only INTERFACE ${FMT_REQUIRED_FEATURES})
target_include_directories(fmt-header-only INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
# Install targets.
if (FMT_INSTALL)
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
set(FMT_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/fmt CACHE STRING
"Installation directory for cmake files, relative to ${CMAKE_INSTALL_PREFIX}.")
set(version_config ${PROJECT_BINARY_DIR}/fmt-config-version.cmake)
set(project_config ${PROJECT_BINARY_DIR}/fmt-config.cmake)
set(pkgconfig ${PROJECT_BINARY_DIR}/fmt.pc)
set(targets_export_name fmt-targets)
set (INSTALL_TARGETS fmt)
if (TARGET fmt-header-only)
set(INSTALL_TARGETS ${INSTALL_TARGETS} fmt-header-only)
endif ()
set(FMT_LIB_DIR ${CMAKE_INSTALL_LIBDIR} CACHE STRING
"Installation directory for libraries, relative to ${CMAKE_INSTALL_PREFIX}.")
set(FMT_INC_DIR ${CMAKE_INSTALL_INCLUDEDIR}/fmt CACHE STRING
"Installation directory for include files, relative to ${CMAKE_INSTALL_PREFIX}.")
set(FMT_PKGCONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig CACHE PATH
"Installation directory for pkgconfig (.pc) files, relative to ${CMAKE_INSTALL_PREFIX}.")
# Generate the version, config and target files into the build directory.
write_basic_package_version_file(
${version_config}
VERSION ${FMT_VERSION}
COMPATIBILITY AnyNewerVersion)
configure_file(
"${PROJECT_SOURCE_DIR}/support/cmake/fmt.pc.in"
"${pkgconfig}"
@ONLY)
configure_package_config_file(
${PROJECT_SOURCE_DIR}/support/cmake/fmt-config.cmake.in
${project_config}
INSTALL_DESTINATION ${FMT_CMAKE_DIR})
# Use a namespace because CMake provides better diagnostics for namespaced
# imported targets.
export(TARGETS ${INSTALL_TARGETS} NAMESPACE fmt::
FILE ${PROJECT_BINARY_DIR}/${targets_export_name}.cmake)
# Install version, config and target files.
install(
FILES ${project_config} ${version_config}
DESTINATION ${FMT_CMAKE_DIR})
install(EXPORT ${targets_export_name} DESTINATION ${FMT_CMAKE_DIR}
NAMESPACE fmt::)
# Install the library and headers.
install(TARGETS ${INSTALL_TARGETS} EXPORT ${targets_export_name}
DESTINATION ${FMT_LIB_DIR})
install(FILES $<TARGET_PDB_FILE:${INSTALL_TARGETS}>
DESTINATION ${FMT_LIB_DIR} OPTIONAL)
install(FILES ${FMT_HEADERS} DESTINATION ${FMT_INC_DIR})
install(FILES "${pkgconfig}" DESTINATION "${FMT_PKGCONFIG_DIR}")
endif ()
if (FMT_DOC)
add_subdirectory(doc)
endif ()
if (FMT_TEST)
enable_testing()
add_subdirectory(test)
endif ()
# Control fuzzing independent of the unit tests.
if (FMT_FUZZ)
add_subdirectory(test/fuzzing)
endif ()
set(gitignore ${PROJECT_SOURCE_DIR}/.gitignore)
if (MASTER_PROJECT AND EXISTS ${gitignore})
# Get the list of ignored files from .gitignore. # Get the list of ignored files from .gitignore.
file (STRINGS ".gitignore" lines) file (STRINGS ${gitignore} lines)
LIST(REMOVE_ITEM lines /doc/html) LIST(REMOVE_ITEM lines /doc/html)
foreach (line ${lines}) foreach (line ${lines})
string(REPLACE "." "[.]" line "${line}") string(REPLACE "." "[.]" line "${line}")
string(REPLACE "*" ".*" line "${line}") string(REPLACE "*" ".*" line "${line}")
set(ignored_files ${ignored_files} "${line}$" "${line}/") set(ignored_files ${ignored_files} "${line}$" "${line}/")
endforeach () endforeach ()
set(ignored_files ${ignored_files} /.git /breathe /format-benchmark sphinx/) set(ignored_files ${ignored_files}
/.git /breathe /format-benchmark sphinx/ .buildinfo .doctrees)
set(CPACK_SOURCE_GENERATOR ZIP) set(CPACK_SOURCE_GENERATOR ZIP)
set(CPACK_SOURCE_IGNORE_FILES ${ignored_files}) set(CPACK_SOURCE_IGNORE_FILES ${ignored_files})
set(CPACK_PACKAGE_VERSION_MAJOR 0) set(CPACK_SOURCE_PACKAGE_FILE_NAME fmt-${FMT_VERSION})
set(CPACK_PACKAGE_VERSION_MINOR 11) set(CPACK_PACKAGE_NAME fmt)
set(CPACK_PACKAGE_VERSION_PATCH 0) set(CPACK_RESOURCE_FILE_README ${PROJECT_SOURCE_DIR}/README.rst)
set(CPACK_SOURCE_PACKAGE_FILE_NAME cppformat-${CPPFORMAT_VERSION})
set(CPACK_RESOURCE_FILE_README ${FORMAT_SOURCE_DIR}/README.rst)
include(CPack) include(CPack)
endif () endif ()

17
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,17 @@
Contributing to {fmt}
=====================
By submitting a pull request or a patch, you represent that you have the right
to license your contribution to the {fmt} project owners and the community,
agree that your contributions are licensed under the {fmt} license, and agree
to future changes to the licensing.
All C++ code must adhere to [Google C++ Style Guide](
https://google.github.io/styleguide/cppguide.html) with the following
exceptions:
* Exceptions are permitted
* snake_case should be used instead of UpperCamelCase for function and type
names
Thanks for contributing!

2399
ChangeLog.rst Normal file

File diff suppressed because it is too large Load Diff

27
LICENSE.rst Normal file
View File

@ -0,0 +1,27 @@
Copyright (c) 2012 - present, Victor Zverovich
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--- Optional exception to the license ---
As an exception, if, as a result of your compiling your source code, portions
of this Software are embedded into a machine-executable object form of such
source code, you may redistribute such embedded portions in such object form
without including the above copyright and permission notices.

View File

@ -1,135 +1,359 @@
C++ Format {fmt}
========== =====
.. image:: https://travis-ci.org/cppformat/cppformat.png?branch=master .. image:: https://travis-ci.org/fmtlib/fmt.png?branch=master
:target: https://travis-ci.org/cppformat/cppformat :target: https://travis-ci.org/fmtlib/fmt
.. image:: https://ci.appveyor.com/api/projects/status/qk0bhyhqp1ekpat8 .. image:: https://ci.appveyor.com/api/projects/status/ehjkiefde6gucy1v
:target: https://ci.appveyor.com/project/vitaut/cppformat :target: https://ci.appveyor.com/project/vitaut/fmt
C++ Format is an open-source formatting library for C++. .. image:: https://img.shields.io/badge/stackoverflow-fmt-blue.svg
It can be used as a safe alternative to printf or as a fast :alt: Ask questions at StackOverflow with the tag fmt
alternative to IOStreams. :target: http://stackoverflow.com/questions/tagged/fmt
.. image:: https://oss-fuzz-build-logs.storage.googleapis.com/badges/libfmt.svg
:alt: fmt is continuously fuzzed att oss-fuzz
:target: https://bugs.chromium.org/p/oss-fuzz/issues/list?colspec=ID%20Type%20Component%20Status%20Proj%20Reported%20Owner%20Summary&q=proj%3Dfmt&can=1
**{fmt}** is an open-source formatting library for C++.
It can be used as a safe and fast alternative to (s)printf and iostreams.
`Documentation <https://fmt.dev/latest/>`__
Q&A: ask questions on `StackOverflow with the tag fmt <http://stackoverflow.com/questions/tagged/fmt>`_.
Features Features
-------- --------
* Two APIs: faster concatenation-based write API and slower (but still * Replacement-based `format API <https://fmt.dev/dev/api.html>`_ with
very fast) replacement-based format API with positional arguments for positional arguments for localization.
localization. * `Format string syntax <https://fmt.dev/dev/syntax.html>`_ similar to the one
* Write API similar to the one used by IOStreams but much faster and more of `str.format <https://docs.python.org/2/library/stdtypes.html#str.format>`_
consistent. in Python.
* Format API with `format string syntax * Safe `printf implementation
<http://cppformat.github.io/doc/latest#format-string-syntax>`__ <https://fmt.dev/latest/api.html#printf-formatting>`_ including
similar to the one used by `str.format the POSIX extension for positional arguments.
<http://docs.python.org/2/library/stdtypes.html#str.format>`__ in Python. * Implementation of `C++20 std::format <https://fmt.dev/Text%20Formatting.html>`__.
* Support for user-defined types. * Support for user-defined types.
* High speed: performance of the format API is close to that of * High performance: faster than common standard library implementations of
glibc's `printf <http://en.cppreference.com/w/cpp/io/c/fprintf>`__ `printf <http://en.cppreference.com/w/cpp/io/c/fprintf>`_ and
and better than performance of IOStreams. See `Speed tests`_ and iostreams. See `Speed tests`_ and `Fast integer to string conversion in C++
`Fast integer to string conversion in C++
<http://zverovich.net/2013/09/07/integer-to-string-conversion-in-cplusplus.html>`_. <http://zverovich.net/2013/09/07/integer-to-string-conversion-in-cplusplus.html>`_.
* Small code size both in terms of source code (format consists of a single * Small code size both in terms of source code (the minimum configuration
header file and a single source file) and compiled code. consists of just three header files, ``core.h``, ``format.h`` and
See `Compile time and code bloat`_. ``format-inl.h``) and compiled code. See `Compile time and code bloat`_.
* Reliability: the library has an extensive set of `unit tests * Reliability: the library has an extensive set of `unit tests
<https://github.com/cppformat/cppformat/tree/master/test>`__. <https://github.com/fmtlib/fmt/tree/master/test>`_ and is continuously fuzzed.
* Safety: the library is fully type safe, errors in format strings are * Safety: the library is fully type safe, errors in format strings can be
reported using exceptions, automatic memory management prevents buffer reported at compile time, automatic memory management prevents buffer overflow
overflow errors. errors.
* Ease of use: small self-contained code base, no external dependencies, * Ease of use: small self-contained code base, no external dependencies,
permissive BSD `license`_. permissive MIT `license
* `Portability <http://cppformat.github.io#portability>`__ with consistent output <https://github.com/fmtlib/fmt/blob/master/LICENSE.rst>`_
across platforms and support for older compilers. * `Portability <https://fmt.dev/latest/index.html#portability>`_ with
consistent output across platforms and support for older compilers.
* Clean warning-free codebase even on high warning levels * Clean warning-free codebase even on high warning levels
(-Wall -Wextra -pedantic). (``-Wall -Wextra -pedantic``).
* Support for wide strings. * Support for wide strings.
* Optional header-only configuration enabled with the ``FMT_HEADER_ONLY`` macro.
See the `documentation <http://cppformat.github.io/doc/latest>`__ for more details. See the `documentation <https://fmt.dev/latest/>`_ for more details.
Examples Examples
-------- --------
This prints ``Hello, world!`` to stdout: Print ``Hello, world!`` to ``stdout``:
.. code-block:: c++ .. code:: c++
fmt::print("Hello, {}!", "world"); // uses Python-like format string syntax fmt::print("Hello, {}!", "world"); // Python-like format string syntax
fmt::printf("Hello, %s!", "world"); // uses printf format string syntax fmt::printf("Hello, %s!", "world"); // printf format string syntax
Arguments can be accessed by position and arguments' indices can be repeated: Format a string and use positional arguments:
.. code-block:: c++ .. code:: c++
std::string s = fmt::format("{0}{1}{0}", "abra", "cad"); std::string s = fmt::format("I'd rather be {1} than {0}.", "right", "happy");
// s == "abracadabra" // s == "I'd rather be happy than right."
C++ Format can be used as a safe portable replacement for ``itoa``: Check a format string at compile time:
.. code-block:: c++ .. code:: c++
fmt::Writer w; // test.cc
w << 42; // replaces itoa(42, buffer, 10) #define FMT_STRING_ALIAS 1
w << fmt::hex(42); // replaces itoa(42, buffer, 16) #include <fmt/format.h>
// access the string using w.str() or w.c_str() std::string s = format(fmt("{2}"), 42);
An object of any user-defined type for which there is an overloaded .. code::
:code:`std::ostream` insertion operator (``operator<<``) can be formatted:
.. code-block:: c++ $ c++ -Iinclude -std=c++14 test.cc
...
test.cc:4:17: note: in instantiation of function template specialization 'fmt::v5::format<S, int>' requested here
std::string s = format(fmt("{2}"), 42);
^
include/fmt/core.h:778:19: note: non-constexpr function 'on_error' cannot be used in a constant expression
ErrorHandler::on_error(message);
^
include/fmt/format.h:2226:16: note: in call to '&checker.context_->on_error(&"argument index out of range"[0])'
context_.on_error("argument index out of range");
^
class Date { Use {fmt} as a safe portable replacement for ``itoa``
int year_, month_, day_; (`godbolt <https://godbolt.org/g/NXmpU4>`_):
public:
Date(int year, int month, int day) : year_(year), month_(month), day_(day) {}
friend std::ostream &operator<<(std::ostream &os, const Date &d) { .. code:: c++
return os << d.year_ << '-' << d.month_ << '-' << d.day_;
fmt::memory_buffer buf;
format_to(buf, "{}", 42); // replaces itoa(42, buffer, 10)
format_to(buf, "{:x}", 42); // replaces itoa(42, buffer, 16)
// access the string with to_string(buf) or buf.data()
Format objects of user-defined types via a simple `extension API
<https://fmt.dev/latest/api.html#formatting-user-defined-types>`_:
.. code:: c++
#include "fmt/format.h"
struct date {
int year, month, day;
};
template <>
struct fmt::formatter<date> {
template <typename ParseContext>
constexpr auto parse(ParseContext &ctx) { return ctx.begin(); }
template <typename FormatContext>
auto format(const date &d, FormatContext &ctx) {
return format_to(ctx.out(), "{}-{}-{}", d.year, d.month, d.day);
} }
}; };
std::string s = fmt::format("The date is {}", Date(2012, 12, 9)); std::string s = fmt::format("The date is {}", date{2012, 12, 9});
// s == "The date is 2012-12-9" // s == "The date is 2012-12-9"
You can use the `FMT_VARIADIC Create your own functions similar to `format
<http://cppformat.github.io/doc/latest/#project0format_8h_1a65215c7dfcc0e942cd0798860877e86b>`__ <https://fmt.dev/latest/api.html#format>`_ and
macro to create your own functions similar to `format `print <https://fmt.dev/latest/api.html#print>`_
<http://cppformat.github.io/doc/latest#fmt::format__StringRef.ArgListCR>`__ and which take arbitrary arguments (`godbolt <https://godbolt.org/g/MHjHVf>`_):
`print <http://cppformat.github.io/doc/latest#fmt::print__StringRef.ArgListCR>`__
which take arbitrary arguments:
.. code-block:: c++ .. code:: c++
// Prints formatted error message. // Prints formatted error message.
void report_error(const char *format, const fmt::ArgList &args) { void vreport_error(const char *format, fmt::format_args args) {
fmt::print("Error: "); fmt::print("Error: ");
fmt::print(format, args); fmt::vprint(format, args);
}
template <typename... Args>
void report_error(const char *format, const Args & ... args) {
vreport_error(format, fmt::make_format_args(args...));
} }
FMT_VARIADIC(void, report_error, const char *)
report_error("file not found: {}", path); report_error("file not found: {}", path);
Note that you only need to define one function that takes ``const fmt::ArgList &`` Note that ``vreport_error`` is not parameterized on argument types which can
argument and ``FMT_VARIADIC`` automatically defines necessary wrappers that improve compile times and reduce code size compared to a fully parameterized
accept variable number of arguments. These wrappers are simple inline functions version.
that are very fast and don't result in code bloat.
Benchmarks
----------
Speed tests
~~~~~~~~~~~
================= ============= ===========
Library Method Run Time, s
================= ============= ===========
libc printf 1.01
libc++ std::ostream 3.04
{fmt} 1632f72 fmt::print 0.86
tinyformat 2.0.1 tfm::printf 3.23
Boost Format 1.67 boost::format 7.98
Folly Format folly::format 2.23
================= ============= ===========
{fmt} is the fastest of the benchmarked methods, ~17% faster than ``printf``.
The above results were generated by building ``tinyformat_test.cpp`` on macOS
10.14.3 with ``clang++ -O3 -DSPEED_TEST -DHAVE_FORMAT``, and taking the best of
three runs. In the test, the format string ``"%0.10f:%04d:%+g:%s:%p:%c:%%\n"``
or equivalent is filled 2,000,000 times with output sent to ``/dev/null``; for
further details refer to the `source
<https://github.com/fmtlib/format-benchmark/blob/master/tinyformat_test.cpp>`_.
{fmt} is 10x faster than ``std::ostringstream`` and ``sprintf`` on floating-point
formatting (`dtoa-benchmark <https://github.com/fmtlib/dtoa-benchmark>`_)
and as fast as `double-conversion <https://github.com/google/double-conversion>`_:
.. image:: https://user-images.githubusercontent.com/576385/54883977-9fe8c000-4e28-11e9-8bde-272d122e7c52.jpg
:target: https://fmt.dev/unknown_mac64_clang10.0.html
Compile time and code bloat
~~~~~~~~~~~~~~~~~~~~~~~~~~~
The script `bloat-test.py
<https://github.com/fmtlib/format-benchmark/blob/master/bloat-test.py>`_
from `format-benchmark <https://github.com/fmtlib/format-benchmark>`_
tests compile time and code bloat for nontrivial projects.
It generates 100 translation units and uses ``printf()`` or its alternative
five times in each to simulate a medium sized project. The resulting
executable size and compile time (Apple LLVM version 8.1.0 (clang-802.0.42),
macOS Sierra, best of three) is shown in the following tables.
**Optimized build (-O3)**
============= =============== ==================== ==================
Method Compile Time, s Executable size, KiB Stripped size, KiB
============= =============== ==================== ==================
printf 2.6 29 26
printf+string 16.4 29 26
iostreams 31.1 59 55
{fmt} 19.0 37 34
tinyformat 44.0 103 97
Boost Format 91.9 226 203
Folly Format 115.7 101 88
============= =============== ==================== ==================
As you can see, {fmt} has 60% less overhead in terms of resulting binary code
size compared to iostreams and comes pretty close to ``printf``. Boost Format
and Folly Format have the largest overheads.
``printf+string`` is the same as ``printf`` but with extra ``<string>``
include to measure the overhead of the latter.
**Non-optimized build**
============= =============== ==================== ==================
Method Compile Time, s Executable size, KiB Stripped size, KiB
============= =============== ==================== ==================
printf 2.2 33 30
printf+string 16.0 33 30
iostreams 28.3 56 52
{fmt} 18.2 59 50
tinyformat 32.6 88 82
Boost Format 54.1 365 303
Folly Format 79.9 445 430
============= =============== ==================== ==================
``libc``, ``lib(std)c++`` and ``libfmt`` are all linked as shared libraries to
compare formatting function overhead only. Boost Format and tinyformat are
header-only libraries so they don't provide any linkage options.
Running the tests
~~~~~~~~~~~~~~~~~
Please refer to `Building the library`__ for the instructions on how to build
the library and run the unit tests.
__ https://fmt.dev/latest/usage.html#building-the-library
Benchmarks reside in a separate repository,
`format-benchmarks <https://github.com/fmtlib/format-benchmark>`_,
so to run the benchmarks you first need to clone this repository and
generate Makefiles with CMake::
$ git clone --recursive https://github.com/fmtlib/format-benchmark.git
$ cd format-benchmark
$ cmake .
Then you can run the speed test::
$ make speed-test
or the bloat test::
$ make bloat-test
Projects using this library Projects using this library
--------------------------- ---------------------------
* `AMPL <https://github.com/ampl/ampl>`__: * `0 A.D. <http://play0ad.com/>`_: A free, open-source, cross-platform real-time
Open-source AMPL solver interface, solver connections, table handlers strategy game
and examples
* `Saddy <https://code.google.com/p/saddy/>`__: * `AMPL/MP <https://github.com/ampl/mp>`_:
Small crossplatform 2D graphic engine An open-source library for mathematical programming
* `AvioBook <https://www.aviobook.aero/en>`_: A comprehensive aircraft
operations suite
* `Celestia <https://celestia.space/>`_: Real-time 3D visualization of space
* `HarpyWar/pvpgn <https://github.com/HarpyWar/pvpgn>`__: * `Ceph <https://ceph.com/>`_: A scalable distributed storage system
* `ccache <https://ccache.dev/>`_: A compiler cache
* `CUAUV <http://cuauv.org/>`_: Cornell University's autonomous underwater
vehicle
* `HarpyWar/pvpgn <https://github.com/pvpgn/pvpgn-server>`_:
Player vs Player Gaming Network with tweaks Player vs Player Gaming Network with tweaks
* `KBEngine <http://kbengine.org/>`_: An open-source MMOG server engine
* `Keypirinha <http://keypirinha.com/>`_: A semantic launcher for Windows
* `Kodi <https://kodi.tv/>`_ (formerly xbmc): Home theater software
* `Lifeline <https://github.com/peter-clark/lifeline>`_: A 2D game
* `Drake <http://drake.mit.edu/>`_: A planning, control, and analysis toolbox
for nonlinear dynamical systems (MIT)
* `Envoy <https://lyft.github.io/envoy/>`_: C++ L7 proxy and communication bus
(Lyft)
* `FiveM <https://fivem.net/>`_: a modification framework for GTA V
* `MongoDB <https://mongodb.com/>`_: Distributed document database
* `MongoDB Smasher <https://github.com/duckie/mongo_smasher>`_: A small tool to
generate randomized datasets
* `OpenSpace <http://openspaceproject.com/>`_: An open-source astrovisualization
framework
* `PenUltima Online (POL) <http://www.polserver.com/>`_:
An MMO server, compatible with most Ultima Online clients
* `quasardb <https://www.quasardb.net/>`_: A distributed, high-performance,
associative database
* `readpe <https://bitbucket.org/sys_dev/readpe>`_: Read Portable Executable
* `redis-cerberus <https://github.com/HunanTV/redis-cerberus>`_: A Redis cluster
proxy
* `rpclib <http://rpclib.net/>`_: A modern C++ msgpack-RPC server and client
library
* `Saddy <https://github.com/mamontov-cpp/saddy-graphics-engine-2d>`_:
Small crossplatform 2D graphic engine
* `Salesforce Analytics Cloud <http://www.salesforce.com/analytics-cloud/overview/>`_:
Business intelligence software
* `Scylla <http://www.scylladb.com/>`_: A Cassandra-compatible NoSQL data store
that can handle 1 million transactions per second on a single server
* `Seastar <http://www.seastar-project.org/>`_: An advanced, open-source C++
framework for high-performance server applications on modern hardware
* `spdlog <https://github.com/gabime/spdlog>`_: Super fast C++ logging library
* `Stellar <https://www.stellar.org/>`_: Financial platform
* `Touch Surgery <https://www.touchsurgery.com/>`_: Surgery simulator
* `TrinityCore <https://github.com/TrinityCore/TrinityCore>`_: Open-source
MMORPG framework
`More... <https://github.com/search?q=fmtlib&type=Code>`_
If you are aware of other projects using this library, please let me know If you are aware of other projects using this library, please let me know
by `email <mailto:victor.zverovich@gmail.com>`__ or by submitting an by `email <mailto:victor.zverovich@gmail.com>`_ or by submitting an
`issue <https://github.com/cppformat/cppformat/issues>`__. `issue <https://github.com/fmtlib/fmt/issues>`_.
Motivation Motivation
---------- ----------
@ -137,54 +361,53 @@ Motivation
So why yet another formatting library? So why yet another formatting library?
There are plenty of methods for doing this task, from standard ones like There are plenty of methods for doing this task, from standard ones like
the printf family of function and IOStreams to Boost Format library and the printf family of function and iostreams to Boost Format and FastFormat
FastFormat. The reason for creating a new library is that every existing libraries. The reason for creating a new library is that every existing
solution that I found either had serious issues or didn't provide solution that I found either had serious issues or didn't provide
all the features I needed. all the features I needed.
Printf printf
~~~~~~ ~~~~~~
The good thing about printf is that it is very fast and readily available The good thing about ``printf`` is that it is pretty fast and readily available
being a part of the C standard library. The main drawback is that it being a part of the C standard library. The main drawback is that it
doesn't support user-defined types. Printf also has safety issues although doesn't support user-defined types. ``printf`` also has safety issues although
they are mostly solved with `__attribute__ ((format (printf, ...)) they are somewhat mitigated with `__attribute__ ((format (printf, ...))
<http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html>`__ in GCC. <http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html>`_ in GCC.
There is a POSIX extension that adds positional arguments required for There is a POSIX extension that adds positional arguments required for
`i18n <http://en.wikipedia.org/wiki/Internationalization_and_localization>`__ `i18n <https://en.wikipedia.org/wiki/Internationalization_and_localization>`_
to printf but it is not a part of C99 and may not be available on some to ``printf`` but it is not a part of C99 and may not be available on some
platforms. platforms.
IOStreams iostreams
~~~~~~~~~ ~~~~~~~~~
The main issue with IOStreams is best illustrated with an example: The main issue with iostreams is best illustrated with an example:
.. code-block:: c++ .. code:: c++
std::cout << std::setprecision(2) << std::fixed << 1.23456 << "\n"; std::cout << std::setprecision(2) << std::fixed << 1.23456 << "\n";
which is a lot of typing compared to printf: which is a lot of typing compared to printf:
.. code-block:: c++ .. code:: c++
printf("%.2f\n", 1.23456); printf("%.2f\n", 1.23456);
Matthew Wilson, the author of FastFormat, referred to this situation with Matthew Wilson, the author of FastFormat, called this "chevron hell". iostreams
IOStreams as "chevron hell". IOStreams doesn't support positional arguments don't support positional arguments by design.
by design.
The good part is that IOStreams supports user-defined types and is safe The good part is that iostreams support user-defined types and are safe although
although error reporting is awkward. error handling is awkward.
Boost Format library Boost Format
~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~
This is a very powerful library which supports both printf-like format This is a very powerful library which supports both ``printf``-like format
strings and positional arguments. The main its drawback is performance. strings and positional arguments. Its main drawback is performance. According to
According to various benchmarks it is much slower than other methods various benchmarks it is much slower than other methods considered here. Boost
considered here. Boost Format also has excessive build times and severe Format also has excessive build times and severe code bloat issues (see
code bloat issues (see `Benchmarks`_). `Benchmarks`_).
FastFormat FastFormat
~~~~~~~~~~ ~~~~~~~~~~
@ -205,199 +428,93 @@ too restrictive for using it in some projects.
Loki SafeFormat Loki SafeFormat
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
SafeFormat is a formatting library which uses printf-like format strings SafeFormat is a formatting library which uses ``printf``-like format strings and
and is type safe. It doesn't support user-defined types or positional is type safe. It doesn't support user-defined types or positional arguments and
arguments. It makes unconventional use of ``operator()`` for passing makes unconventional use of ``operator()`` for passing format arguments.
format arguments.
Tinyformat Tinyformat
~~~~~~~~~~ ~~~~~~~~~~
This library supports printf-like format strings and is very small and This library supports ``printf``-like format strings and is very small .
fast. Unfortunately it doesn't support positional arguments and wrapping It doesn't support positional arguments and wrapping it in C++98 is somewhat
it in C++98 is somewhat difficult. However if you only need a type-safe difficult. Tinyformat relies on iostreams which limits its performance.
printf replacement with support for user-defined types, I highly recommend
this library.
Boost Spirit.Karma Boost Spirit.Karma
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
This is not really a formatting library but I decided to include it here This is not really a formatting library but I decided to include it here for
for completeness. As IOStreams it suffers from the problem of mixing completeness. As iostreams, it suffers from the problem of mixing verbatim text
verbatim text with arguments. The library is pretty fast, but slower with arguments. The library is pretty fast, but slower on integer formatting
on integer formatting than ``fmt::Writer`` on Karma's own benchmark, than ``fmt::format_int`` on Karma's own benchmark,
see `Fast integer to string conversion in C++ see `Fast integer to string conversion in C++
<http://zverovich.net/2013/09/07/integer-to-string-conversion-in-cplusplus.html>`__. <http://zverovich.net/2013/09/07/integer-to-string-conversion-in-cplusplus.html>`_.
Benchmarks FAQ
---------- ---
Speed tests Q: how can I capture formatting arguments and format them later?
~~~~~~~~~~~
The following speed tests results were generated by building A: use ``std::tuple``:
``tinyformat_test.cpp`` on Ubuntu GNU/Linux 12.10 with
``g++-4.7.2 -O3 -DSPEED_TEST -DHAVE_FORMAT``, and taking the best of three
runs. In the test, the format string ``"%0.10f:%04d:%+g:%s:%p:%c:%%\n"`` or
equivalent is filled 2000000 times with output sent to ``/dev/null``; for
further details see the `source
<https://github.com/cppformat/format-benchmark/blob/master/tinyformat_test.cpp>`__.
============== ======== .. code:: c++
test name run time
============== ========
libc printf 1.28s
std::ostream 2.09s
format 1.32s
tinyformat 2.55s
boost::format 10.42s
============== ========
As you can see boost::format is much slower than the alternative methods; this template <typename... Args>
is confirmed by `other tests <http://accu.org/index.php/journals/1539>`__. auto capture(const Args&... args) {
Tinyformat is quite good coming close to IOStreams. Unfortunately tinyformat return std::make_tuple(args...);
cannot be faster than the IOStreams because it uses them internally. }
Performance of format is close to that of printf.
Compile time and code bloat auto print_message = [](const auto&... args) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~ fmt::print(args...);
};
The script `bloat-test.py // Capture and store arguments:
<https://github.com/cppformat/format-benchmark/blob/master/bloat-test.py>`__ auto args = capture("{} {}", 42, "foo");
from `format-benchmark <https://github.com/cppformat/format-benchmark>`__ // Do formatting:
tests compile time and code bloat for nontrivial projects. std::apply(print_message, args);
It generates 100 translation units and uses ``printf()`` or its alternative
five times in each to simulate a medium sized project. The resulting
executable size and compile time (g++-4.8.1, Ubuntu GNU/Linux 13.10,
best of three) is shown in the following tables.
**Optimized build (-O3)**
============ =============== ==================== ==================
Method Compile Time, s Executable size, KiB Stripped size, KiB
============ =============== ==================== ==================
printf 2.6 41 30
IOStreams 19.4 92 70
C++ Format 46.8 46 34
tinyformat 64.6 418 386
Boost Format 222.8 990 923
============ =============== ==================== ==================
As you can see, C++ Format has 80% less overhead in terms of resulting
code size compared to IOStreams and comes pretty close to ``printf``.
Boost Format has by far the largest overheads.
**Non-optimized build**
============ =============== ==================== ==================
Method Compile Time, s Executable size, KiB Stripped size, KiB
============ =============== ==================== ==================
printf 2.1 41 30
IOStreams 19.7 86 62
C++ Format 47.9 108 86
tinyformat 27.7 234 190
Boost Format 122.6 884 763
============ =============== ==================== ==================
``libc``, ``libstdc++`` and ``libformat`` are all linked as shared
libraries to compare formatting function overhead only. Boost Format
and tinyformat are header-only libraries so they don't provide any
linkage options.
Running the tests
~~~~~~~~~~~~~~~~~
To run the unit tests first get the source code by cloning the repository::
$ git clone https://github.com/cppformat/cppformat.git
or downloading a package from
`Releases <https://github.com/cppformat/cppformat/releases>`__.
Then go to the cppformat directory, generate Makefiles with
`CMake <http://www.cmake.org/>`__ and build the project::
$ cd cppformat
$ cmake .
$ make
Now you can run the unit tests::
$ make test
Benchmarks reside in a separate repository,
`format-benchmarks <https://github.com/cppformat/format-benchmark>`__,
so to run the benchmarks you first need to clone this repository and
generate Makefiles with CMake::
$ git clone --recursive https://github.com/cppformat/format-benchmark.git
$ cd format-benchmark
$ cmake .
Then you can run the speed test::
$ make speed-test
or the bloat test::
$ make bloat-test
License License
------- -------
Copyright (c) 2012, Victor Zverovich {fmt} is distributed under the MIT `license
<https://github.com/fmtlib/fmt/blob/master/LICENSE.rst>`_.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Documentation License
---------------------
The `Format String Syntax The `Format String Syntax
<http://cppformat.github.io/doc/latest#format-string-syntax>`__ <https://fmt.dev/latest/syntax.html>`_
section in the documentation is based on the one from Python `string module section in the documentation is based on the one from Python `string module
documentation <http://docs.python.org/3/library/string.html#module-string>`__ documentation <https://docs.python.org/3/library/string.html#module-string>`_
adapted for the current library. For this reason the documentation is adapted for the current library. For this reason the documentation is
distributed under the Python Software Foundation license available in distributed under the Python Software Foundation license available in
`doc/LICENSE.python `doc/python-license.txt
<https://raw.github.com/cppformat/cppformat/master/doc/LICENSE.python>`__. <https://raw.github.com/fmtlib/fmt/master/doc/python-license.txt>`_.
It only applies if you distribute the documentation of fmt.
Acknowledgments Acknowledgments
--------------- ---------------
The {fmt} library is maintained by Victor Zverovich (`vitaut
<https://github.com/vitaut>`_) and Jonathan Müller (`foonathan
<https://github.com/foonathan>`_) with contributions from many other people.
See `Contributors <https://github.com/fmtlib/fmt/graphs/contributors>`_ and
`Releases <https://github.com/fmtlib/fmt/releases>`_ for some of the names.
Let us know if your contribution is not listed or mentioned incorrectly and
we'll make it right.
The benchmark section of this readme file and the performance tests are taken The benchmark section of this readme file and the performance tests are taken
from the excellent `tinyformat <https://github.com/c42f/tinyformat>`__ library from the excellent `tinyformat <https://github.com/c42f/tinyformat>`_ library
written by Chris Foster. Boost Format library is acknowledged transitively written by Chris Foster. Boost Format library is acknowledged transitively
since it had some influence on tinyformat. since it had some influence on tinyformat.
Some ideas used in the implementation are borrowed from `Loki Some ideas used in the implementation are borrowed from `Loki
<http://loki-lib.sourceforge.net/>`__ SafeFormat and `Diagnostic API <http://loki-lib.sourceforge.net/>`_ SafeFormat and `Diagnostic API
<http://clang.llvm.org/doxygen/classclang_1_1Diagnostic.html>`__ in <http://clang.llvm.org/doxygen/classclang_1_1Diagnostic.html>`_ in
`Clang <http://clang.llvm.org/>`__. `Clang <http://clang.llvm.org/>`_.
Format string syntax and the documentation are based on Python's `str.format Format string syntax and the documentation are based on Python's `str.format
<http://docs.python.org/2/library/stdtypes.html#str.format>`__. <http://docs.python.org/2/library/stdtypes.html#str.format>`_.
Thanks `Doug Turnbull <https://github.com/softwaredoug>`__ for his valuable Thanks `Doug Turnbull <https://github.com/softwaredoug>`_ for his valuable
comments and contribution to the design of the type-safe API and comments and contribution to the design of the type-safe API and
`Gregory Czajkowski <https://github.com/gcflymoto>`__ for implementing binary `Gregory Czajkowski <https://github.com/gcflymoto>`_ for implementing binary
formatting. Thanks `Ruslan Baratov <https://github.com/ruslo>`__ for comprehensive formatting. Thanks `Ruslan Baratov <https://github.com/ruslo>`_ for comprehensive
`comparison of integer formatting algorithms <https://github.com/ruslo/int-dec-format-tests>`__ `comparison of integer formatting algorithms <https://github.com/ruslo/int-dec-format-tests>`_
and useful comments regarding performance, `Boris Kaul <https://github.com/localvoid>`__ for and useful comments regarding performance, `Boris Kaul <https://github.com/localvoid>`_ for
`C++ counting digits benchmark <https://github.com/localvoid/cxx-benchmark-count-digits>`__. `C++ counting digits benchmark <https://github.com/localvoid/cxx-benchmark-count-digits>`_.
Thanks to `CarterLi <https://github.com/CarterLi>`_ for contributing various
improvements to the code.

View File

@ -1,54 +0,0 @@
environment:
CTEST_OUTPUT_ON_FAILURE: 1
matrix:
- Build: msvc
Config: Debug
- Build: msvc
Config: Release
- Build: mingw
Config: Debug
- Build: mingw
Config: Release
install:
- ps: |
if ($env:Build -eq "mingw") {
# Install MinGW.
$url = "http://sourceforge.net/projects/mingw-w64/files/"
$url += "Toolchains%20targetting%20Win64/Personal%20Builds/"
$url += "mingw-builds/4.9.0/threads-win32/seh/"
$url += "x86_64-4.9.0-release-win32-seh-rt_v3-rev2.7z/download"
Invoke-WebRequest -UserAgent wget -Uri $url -OutFile mingw.7z
&7z x -oC:\ mingw.7z > $null
}
- set PATH=C:\Program Files (x86)\MSBuild\12.0\bin\;%PATH%;C:\mingw64\bin
before_build:
- ps: |
if ($env:Build -eq "mingw") {
# Remove path to Git bin directory from PATH because it breaks MinGW config.
$env:PATH = $env:PATH -replace "C:\\Program Files \(x86\)\\Git\\bin",""
$generator = "-GMinGW Makefiles"
}
echo "-DCMAKE_BUILD_TYPE=$env:Config"
cmake -DFMT_EXTRA_TESTS=ON "-DCMAKE_BUILD_TYPE=$env:Config" "$generator" .
build_script:
- ps: |
if ($env:Build -eq "mingw") {
mingw32-make -j4
} else {
msbuild /m:4 /p:Config=$env:Config FORMAT.sln
}
test_script:
- ps: |
if ($env:Build -eq "mingw") {
mingw32-make test
} else {
msbuild RUN_TESTS.vcxproj
}
on_failure:
- appveyor PushArtifact Testing/Temporary/LastTest.log
- appveyor AddTest test

Submodule breathe deleted from e1a7b18d33

View File

@ -1,11 +0,0 @@
@echo on
rem This scripts configures build environment and runs CMake.
rem Use it instead of running CMake directly when building with
rem the Microsoft SDK toolchain rather than Visual Studio.
rem It is used in the same way as cmake, for example:
rem
rem run-cmake -G "Visual Studio 10 Win64" .
for /F "delims=" %%i IN ('cmake "-DPRINT_PATH=1" -P %~dp0/FindSetEnv.cmake') DO set setenv=%%i
if NOT "%setenv%" == "" call "%setenv%"
cmake %*

View File

@ -1,7 +1,12 @@
add_custom_command(OUTPUT html/index.html find_program(DOXYGEN doxygen)
COMMAND doxygen if (NOT DOXYGEN)
COMMAND rm -rf html message(STATUS "Target 'doc' disabled (requires doxygen)")
COMMAND sphinx-build -b html . html return ()
DEPENDS ../CMakeLists.txt ../format.h Doxyfile endif ()
conf.py index.rst _templates/layout.html)
add_custom_target(doc DEPENDS html/index.html) add_custom_target(doc
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build.py ${FMT_VERSION}
SOURCES api.rst syntax.rst usage.rst build.py conf.py _templates/layout.html)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/
DESTINATION share/doc/fmt OPTIONAL)

View File

@ -1,20 +0,0 @@
PROJECT_NAME = Format
GENERATE_LATEX = NO
GENERATE_MAN = NO
GENERATE_RTF = NO
CASE_SENSE_NAMES = NO
INPUT = ../format.h
QUIET = YES
JAVADOC_AUTOBRIEF = YES
AUTOLINK_SUPPORT = NO
GENERATE_HTML = NO
GENERATE_XML = YES
XML_OUTPUT = doxyxml
ALIASES = "rst=\verbatim embed:rst"
ALIASES += "endrst=\endverbatim"
PREDEFINED = _WIN32=1 \
FMT_NO_DEPRECATED=1 \
FMT_USE_VARIADIC_TEMPLATES=1 \
FMT_USE_RVALUE_REFERENCES=1
EXCLUDE_SYMBOLS = fmt::internal::* BasicArg FormatParser StringValue \
write_str

7
doc/_static/bootstrap.min.js vendored Normal file

File diff suppressed because one or more lines are too long

28
doc/_static/breathe.css vendored Normal file
View File

@ -0,0 +1,28 @@
/* -- breathe specific styles ----------------------------------------------- */
/* So enum value descriptions are displayed inline to the item */
.breatheenumvalues li tt + p {
display: inline;
}
/* So parameter descriptions are displayed inline to the item */
.breatheparameterlist li tt + p {
display: inline;
}
.container .breathe-sectiondef {
width: inherit;
}
.github-btn {
border: 0;
overflow: hidden;
}
.jumbotron {
background-size: 100% 4px;
background-repeat: repeat-y;
color: white;
text-align: center;
}

Binary file not shown.

View File

@ -0,0 +1,229 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata></metadata>
<defs>
<font id="glyphicons_halflingsregular" horiz-adv-x="1200" >
<font-face units-per-em="1200" ascent="960" descent="-240" />
<missing-glyph horiz-adv-x="500" />
<glyph />
<glyph />
<glyph unicode="&#xd;" />
<glyph unicode=" " />
<glyph unicode="*" d="M100 500v200h259l-183 183l141 141l183 -183v259h200v-259l183 183l141 -141l-183 -183h259v-200h-259l183 -183l-141 -141l-183 183v-259h-200v259l-183 -183l-141 141l183 183h-259z" />
<glyph unicode="+" d="M0 400v300h400v400h300v-400h400v-300h-400v-400h-300v400h-400z" />
<glyph unicode="&#xa0;" />
<glyph unicode="&#x2000;" horiz-adv-x="652" />
<glyph unicode="&#x2001;" horiz-adv-x="1304" />
<glyph unicode="&#x2002;" horiz-adv-x="652" />
<glyph unicode="&#x2003;" horiz-adv-x="1304" />
<glyph unicode="&#x2004;" horiz-adv-x="434" />
<glyph unicode="&#x2005;" horiz-adv-x="326" />
<glyph unicode="&#x2006;" horiz-adv-x="217" />
<glyph unicode="&#x2007;" horiz-adv-x="217" />
<glyph unicode="&#x2008;" horiz-adv-x="163" />
<glyph unicode="&#x2009;" horiz-adv-x="260" />
<glyph unicode="&#x200a;" horiz-adv-x="72" />
<glyph unicode="&#x202f;" horiz-adv-x="260" />
<glyph unicode="&#x205f;" horiz-adv-x="326" />
<glyph unicode="&#x20ac;" d="M100 500l100 100h113q0 47 5 100h-218l100 100h135q37 167 112 257q117 141 297 141q242 0 354 -189q60 -103 66 -209h-181q0 55 -25.5 99t-63.5 68t-75 36.5t-67 12.5q-24 0 -52.5 -10t-62.5 -32t-65.5 -67t-50.5 -107h379l-100 -100h-300q-6 -46 -6 -100h406l-100 -100 h-300q9 -74 33 -132t52.5 -91t62 -54.5t59 -29t46.5 -7.5q29 0 66 13t75 37t63.5 67.5t25.5 96.5h174q-31 -172 -128 -278q-107 -117 -274 -117q-205 0 -324 158q-36 46 -69 131.5t-45 205.5h-217z" />
<glyph unicode="&#x2212;" d="M200 400h900v300h-900v-300z" />
<glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
<glyph unicode="&#x2601;" d="M-14 494q0 -80 56.5 -137t135.5 -57h750q120 0 205 86.5t85 207.5t-85 207t-205 86q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5z" />
<glyph unicode="&#x2709;" d="M0 100l400 400l200 -200l200 200l400 -400h-1200zM0 300v600l300 -300zM0 1100l600 -603l600 603h-1200zM900 600l300 300v-600z" />
<glyph unicode="&#x270f;" d="M-13 -13l333 112l-223 223zM187 403l214 -214l614 614l-214 214zM887 1103l214 -214l99 92q13 13 13 32.5t-13 33.5l-153 153q-15 13 -33 13t-33 -13z" />
<glyph unicode="&#xe001;" d="M0 1200h1200l-500 -550v-550h300v-100h-800v100h300v550z" />
<glyph unicode="&#xe002;" d="M14 84q18 -55 86 -75.5t147 5.5q65 21 109 69t44 90v606l600 155v-521q-64 16 -138 -7q-79 -26 -122.5 -83t-25.5 -111q18 -55 86 -75.5t147 4.5q70 23 111.5 63.5t41.5 95.5v881q0 10 -7 15.5t-17 2.5l-752 -193q-10 -3 -17 -12.5t-7 -19.5v-689q-64 17 -138 -7 q-79 -25 -122.5 -82t-25.5 -112z" />
<glyph unicode="&#xe003;" d="M23 693q0 200 142 342t342 142t342 -142t142 -342q0 -142 -78 -261l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 693q0 -136 97 -233t234 -97t233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5 t-234 -97t-97 -233z" />
<glyph unicode="&#xe005;" d="M100 784q0 64 28 123t73 100.5t104.5 64t119 20.5t120 -38.5t104.5 -104.5q48 69 109.5 105t121.5 38t118.5 -20.5t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-149.5 152.5t-126.5 127.5 t-94 124.5t-33.5 117.5z" />
<glyph unicode="&#xe006;" d="M-72 800h479l146 400h2l146 -400h472l-382 -278l145 -449l-384 275l-382 -275l146 447zM168 71l2 1z" />
<glyph unicode="&#xe007;" d="M-72 800h479l146 400h2l146 -400h472l-382 -278l145 -449l-384 275l-382 -275l146 447zM168 71l2 1zM237 700l196 -142l-73 -226l192 140l195 -141l-74 229l193 140h-235l-77 211l-78 -211h-239z" />
<glyph unicode="&#xe008;" d="M0 0v143l400 257v100q-37 0 -68.5 74.5t-31.5 125.5v200q0 124 88 212t212 88t212 -88t88 -212v-200q0 -51 -31.5 -125.5t-68.5 -74.5v-100l400 -257v-143h-1200z" />
<glyph unicode="&#xe009;" d="M0 0v1100h1200v-1100h-1200zM100 100h100v100h-100v-100zM100 300h100v100h-100v-100zM100 500h100v100h-100v-100zM100 700h100v100h-100v-100zM100 900h100v100h-100v-100zM300 100h600v400h-600v-400zM300 600h600v400h-600v-400zM1000 100h100v100h-100v-100z M1000 300h100v100h-100v-100zM1000 500h100v100h-100v-100zM1000 700h100v100h-100v-100zM1000 900h100v100h-100v-100z" />
<glyph unicode="&#xe010;" d="M0 50v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5zM0 650v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5zM600 50v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5zM600 650v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5z" />
<glyph unicode="&#xe011;" d="M0 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM0 450v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5zM0 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5 t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 450v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5 v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 450v200q0 21 14.5 35.5t35.5 14.5h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5z" />
<glyph unicode="&#xe012;" d="M0 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM0 450q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v200q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5 t-14.5 -35.5v-200zM0 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 50v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5 t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5zM400 450v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5zM400 850v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5 v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5z" />
<glyph unicode="&#xe013;" d="M29 454l419 -420l818 820l-212 212l-607 -607l-206 207z" />
<glyph unicode="&#xe014;" d="M106 318l282 282l-282 282l212 212l282 -282l282 282l212 -212l-282 -282l282 -282l-212 -212l-282 282l-282 -282z" />
<glyph unicode="&#xe015;" d="M23 693q0 200 142 342t342 142t342 -142t142 -342q0 -142 -78 -261l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 693q0 -136 97 -233t234 -97t233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5 t-234 -97t-97 -233zM300 600v200h100v100h200v-100h100v-200h-100v-100h-200v100h-100z" />
<glyph unicode="&#xe016;" d="M23 694q0 200 142 342t342 142t342 -142t142 -342q0 -141 -78 -262l300 -299q7 -7 7 -18t-7 -18l-109 -109q-8 -8 -18 -8t-18 8l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 694q0 -136 97 -233t234 -97t233.5 97t96.5 233t-96.5 233t-233.5 97t-234 -97 t-97 -233zM300 601h400v200h-400v-200z" />
<glyph unicode="&#xe017;" d="M23 600q0 183 105 331t272 210v-166q-103 -55 -165 -155t-62 -220q0 -177 125 -302t302 -125t302 125t125 302q0 120 -62 220t-165 155v166q167 -62 272 -210t105 -331q0 -118 -45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5 zM500 750q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v400q0 21 -14.5 35.5t-35.5 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-400z" />
<glyph unicode="&#xe018;" d="M100 1h200v300h-200v-300zM400 1v500h200v-500h-200zM700 1v800h200v-800h-200zM1000 1v1200h200v-1200h-200z" />
<glyph unicode="&#xe019;" d="M26 601q0 -33 6 -74l151 -38l2 -6q14 -49 38 -93l3 -5l-80 -134q45 -59 105 -105l133 81l5 -3q45 -26 94 -39l5 -2l38 -151q40 -5 74 -5q27 0 74 5l38 151l6 2q46 13 93 39l5 3l134 -81q56 44 104 105l-80 134l3 5q24 44 39 93l1 6l152 38q5 40 5 74q0 28 -5 73l-152 38 l-1 6q-16 51 -39 93l-3 5l80 134q-44 58 -104 105l-134 -81l-5 3q-45 25 -93 39l-6 1l-38 152q-40 5 -74 5q-27 0 -74 -5l-38 -152l-5 -1q-50 -14 -94 -39l-5 -3l-133 81q-59 -47 -105 -105l80 -134l-3 -5q-25 -47 -38 -93l-2 -6l-151 -38q-6 -48 -6 -73zM385 601 q0 88 63 151t152 63t152 -63t63 -151q0 -89 -63 -152t-152 -63t-152 63t-63 152z" />
<glyph unicode="&#xe020;" d="M100 1025v50q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-50q0 -11 -7 -18t-18 -7h-1050q-11 0 -18 7t-7 18zM200 100v800h900v-800q0 -41 -29.5 -71t-70.5 -30h-700q-41 0 -70.5 30 t-29.5 71zM300 100h100v700h-100v-700zM500 100h100v700h-100v-700zM500 1100h300v100h-300v-100zM700 100h100v700h-100v-700zM900 100h100v700h-100v-700z" />
<glyph unicode="&#xe021;" d="M1 601l656 644l644 -644h-200v-600h-300v400h-300v-400h-300v600h-200z" />
<glyph unicode="&#xe022;" d="M100 25v1150q0 11 7 18t18 7h475v-500h400v-675q0 -11 -7 -18t-18 -7h-850q-11 0 -18 7t-7 18zM700 800v300l300 -300h-300z" />
<glyph unicode="&#xe023;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM500 500v400h100 v-300h200v-100h-300z" />
<glyph unicode="&#xe024;" d="M-100 0l431 1200h209l-21 -300h162l-20 300h208l431 -1200h-538l-41 400h-242l-40 -400h-539zM488 500h224l-27 300h-170z" />
<glyph unicode="&#xe025;" d="M0 0v400h490l-290 300h200v500h300v-500h200l-290 -300h490v-400h-1100zM813 200h175v100h-175v-100z" />
<glyph unicode="&#xe026;" d="M1 600q0 122 47.5 233t127.5 191t191 127.5t233 47.5t233 -47.5t191 -127.5t127.5 -191t47.5 -233t-47.5 -233t-127.5 -191t-191 -127.5t-233 -47.5t-233 47.5t-191 127.5t-127.5 191t-47.5 233zM188 600q0 -170 121 -291t291 -121t291 121t121 291t-121 291t-291 121 t-291 -121t-121 -291zM350 600h150v300h200v-300h150l-250 -300z" />
<glyph unicode="&#xe027;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM350 600l250 300 l250 -300h-150v-300h-200v300h-150z" />
<glyph unicode="&#xe028;" d="M0 25v475l200 700h800l199 -700l1 -475q0 -11 -7 -18t-18 -7h-1150q-11 0 -18 7t-7 18zM200 500h200l50 -200h300l50 200h200l-97 500h-606z" />
<glyph unicode="&#xe029;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -172 121.5 -293t292.5 -121t292.5 121t121.5 293q0 171 -121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM500 397v401 l297 -200z" />
<glyph unicode="&#xe030;" d="M23 600q0 -118 45.5 -224.5t123 -184t184 -123t224.5 -45.5t224.5 45.5t184 123t123 184t45.5 224.5h-150q0 -177 -125 -302t-302 -125t-302 125t-125 302t125 302t302 125q136 0 246 -81l-146 -146h400v400l-145 -145q-157 122 -355 122q-118 0 -224.5 -45.5t-184 -123 t-123 -184t-45.5 -224.5z" />
<glyph unicode="&#xe031;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5q198 0 355 -122l145 145v-400h-400l147 147q-112 80 -247 80q-177 0 -302 -125t-125 -302h-150zM100 0v400h400l-147 -147q112 -80 247 -80q177 0 302 125t125 302h150q0 -118 -45.5 -224.5t-123 -184t-184 -123 t-224.5 -45.5q-198 0 -355 122z" />
<glyph unicode="&#xe032;" d="M100 0h1100v1200h-1100v-1200zM200 100v900h900v-900h-900zM300 200v100h100v-100h-100zM300 400v100h100v-100h-100zM300 600v100h100v-100h-100zM300 800v100h100v-100h-100zM500 200h500v100h-500v-100zM500 400v100h500v-100h-500zM500 600v100h500v-100h-500z M500 800v100h500v-100h-500z" />
<glyph unicode="&#xe033;" d="M0 100v600q0 41 29.5 70.5t70.5 29.5h100v200q0 82 59 141t141 59h300q82 0 141 -59t59 -141v-200h100q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-900q-41 0 -70.5 29.5t-29.5 70.5zM400 800h300v150q0 21 -14.5 35.5t-35.5 14.5h-200 q-21 0 -35.5 -14.5t-14.5 -35.5v-150z" />
<glyph unicode="&#xe034;" d="M100 0v1100h100v-1100h-100zM300 400q60 60 127.5 84t127.5 17.5t122 -23t119 -30t110 -11t103 42t91 120.5v500q-40 -81 -101.5 -115.5t-127.5 -29.5t-138 25t-139.5 40t-125.5 25t-103 -29.5t-65 -115.5v-500z" />
<glyph unicode="&#xe035;" d="M0 275q0 -11 7 -18t18 -7h50q11 0 18 7t7 18v300q0 127 70.5 231.5t184.5 161.5t245 57t245 -57t184.5 -161.5t70.5 -231.5v-300q0 -11 7 -18t18 -7h50q11 0 18 7t7 18v300q0 116 -49.5 227t-131 192.5t-192.5 131t-227 49.5t-227 -49.5t-192.5 -131t-131 -192.5 t-49.5 -227v-300zM200 20v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14zM800 20v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14z" />
<glyph unicode="&#xe036;" d="M0 400h300l300 -200v800l-300 -200h-300v-400zM688 459l141 141l-141 141l71 71l141 -141l141 141l71 -71l-141 -141l141 -141l-71 -71l-141 141l-141 -141z" />
<glyph unicode="&#xe037;" d="M0 400h300l300 -200v800l-300 -200h-300v-400zM700 857l69 53q111 -135 111 -310q0 -169 -106 -302l-67 54q86 110 86 248q0 146 -93 257z" />
<glyph unicode="&#xe038;" d="M0 401v400h300l300 200v-800l-300 200h-300zM702 858l69 53q111 -135 111 -310q0 -170 -106 -303l-67 55q86 110 86 248q0 145 -93 257zM889 951l7 -8q123 -151 123 -344q0 -189 -119 -339l-7 -8l81 -66l6 8q142 178 142 405q0 230 -144 408l-6 8z" />
<glyph unicode="&#xe039;" d="M0 0h500v500h-200v100h-100v-100h-200v-500zM0 600h100v100h400v100h100v100h-100v300h-500v-600zM100 100v300h300v-300h-300zM100 800v300h300v-300h-300zM200 200v100h100v-100h-100zM200 900h100v100h-100v-100zM500 500v100h300v-300h200v-100h-100v-100h-200v100 h-100v100h100v200h-200zM600 0v100h100v-100h-100zM600 1000h100v-300h200v-300h300v200h-200v100h200v500h-600v-200zM800 800v300h300v-300h-300zM900 0v100h300v-100h-300zM900 900v100h100v-100h-100zM1100 200v100h100v-100h-100z" />
<glyph unicode="&#xe040;" d="M0 200h100v1000h-100v-1000zM100 0v100h300v-100h-300zM200 200v1000h100v-1000h-100zM500 0v91h100v-91h-100zM500 200v1000h200v-1000h-200zM700 0v91h100v-91h-100zM800 200v1000h100v-1000h-100zM900 0v91h200v-91h-200zM1000 200v1000h200v-1000h-200z" />
<glyph unicode="&#xe041;" d="M0 700l1 475q0 10 7.5 17.5t17.5 7.5h474l700 -700l-500 -500zM148 953q0 -42 29 -71q30 -30 71.5 -30t71.5 30q29 29 29 71t-29 71q-30 30 -71.5 30t-71.5 -30q-29 -29 -29 -71z" />
<glyph unicode="&#xe042;" d="M1 700l1 475q0 11 7 18t18 7h474l700 -700l-500 -500zM148 953q0 -42 30 -71q29 -30 71 -30t71 30q30 29 30 71t-30 71q-29 30 -71 30t-71 -30q-30 -29 -30 -71zM701 1200h100l700 -700l-500 -500l-50 50l450 450z" />
<glyph unicode="&#xe043;" d="M100 0v1025l175 175h925v-1000l-100 -100v1000h-750l-100 -100h750v-1000h-900z" />
<glyph unicode="&#xe044;" d="M200 0l450 444l450 -443v1150q0 20 -14.5 35t-35.5 15h-800q-21 0 -35.5 -15t-14.5 -35v-1151z" />
<glyph unicode="&#xe045;" d="M0 100v700h200l100 -200h600l100 200h200v-700h-200v200h-800v-200h-200zM253 829l40 -124h592l62 124l-94 346q-2 11 -10 18t-18 7h-450q-10 0 -18 -7t-10 -18zM281 24l38 152q2 10 11.5 17t19.5 7h500q10 0 19.5 -7t11.5 -17l38 -152q2 -10 -3.5 -17t-15.5 -7h-600 q-10 0 -15.5 7t-3.5 17z" />
<glyph unicode="&#xe046;" d="M0 200q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-150q-4 8 -11.5 21.5t-33 48t-53 61t-69 48t-83.5 21.5h-200q-41 0 -82 -20.5t-70 -50t-52 -59t-34 -50.5l-12 -20h-150q-41 0 -70.5 -29.5t-29.5 -70.5v-600z M356 500q0 100 72 172t172 72t172 -72t72 -172t-72 -172t-172 -72t-172 72t-72 172zM494 500q0 -44 31 -75t75 -31t75 31t31 75t-31 75t-75 31t-75 -31t-31 -75zM900 700v100h100v-100h-100z" />
<glyph unicode="&#xe047;" d="M53 0h365v66q-41 0 -72 11t-49 38t1 71l92 234h391l82 -222q16 -45 -5.5 -88.5t-74.5 -43.5v-66h417v66q-34 1 -74 43q-18 19 -33 42t-21 37l-6 13l-385 998h-93l-399 -1006q-24 -48 -52 -75q-12 -12 -33 -25t-36 -20l-15 -7v-66zM416 521l178 457l46 -140l116 -317h-340 z" />
<glyph unicode="&#xe048;" d="M100 0v89q41 7 70.5 32.5t29.5 65.5v827q0 28 -1 39.5t-5.5 26t-15.5 21t-29 14t-49 14.5v71l471 -1q120 0 213 -88t93 -228q0 -55 -11.5 -101.5t-28 -74t-33.5 -47.5t-28 -28l-12 -7q8 -3 21.5 -9t48 -31.5t60.5 -58t47.5 -91.5t21.5 -129q0 -84 -59 -156.5t-142 -111 t-162 -38.5h-500zM400 200h161q89 0 153 48.5t64 132.5q0 90 -62.5 154.5t-156.5 64.5h-159v-400zM400 700h139q76 0 130 61.5t54 138.5q0 82 -84 130.5t-239 48.5v-379z" />
<glyph unicode="&#xe049;" d="M200 0v57q77 7 134.5 40.5t65.5 80.5l173 849q10 56 -10 74t-91 37q-6 1 -10.5 2.5t-9.5 2.5v57h425l2 -57q-33 -8 -62 -25.5t-46 -37t-29.5 -38t-17.5 -30.5l-5 -12l-128 -825q-10 -52 14 -82t95 -36v-57h-500z" />
<glyph unicode="&#xe050;" d="M-75 200h75v800h-75l125 167l125 -167h-75v-800h75l-125 -167zM300 900v300h150h700h150v-300h-50q0 29 -8 48.5t-18.5 30t-33.5 15t-39.5 5.5t-50.5 1h-200v-850l100 -50v-100h-400v100l100 50v850h-200q-34 0 -50.5 -1t-40 -5.5t-33.5 -15t-18.5 -30t-8.5 -48.5h-49z " />
<glyph unicode="&#xe051;" d="M33 51l167 125v-75h800v75l167 -125l-167 -125v75h-800v-75zM100 901v300h150h700h150v-300h-50q0 29 -8 48.5t-18 30t-33.5 15t-40 5.5t-50.5 1h-200v-650l100 -50v-100h-400v100l100 50v650h-200q-34 0 -50.5 -1t-39.5 -5.5t-33.5 -15t-18.5 -30t-8 -48.5h-50z" />
<glyph unicode="&#xe052;" d="M0 50q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 350q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5 v-100zM0 650q0 -20 14.5 -35t35.5 -15h1000q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1000q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 950q0 -20 14.5 -35t35.5 -15h600q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-600q-21 0 -35.5 -14.5 t-14.5 -35.5v-100z" />
<glyph unicode="&#xe053;" d="M0 50q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 650q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5 v-100zM200 350q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM200 950q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5 t-14.5 -35.5v-100z" />
<glyph unicode="&#xe054;" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1000q-21 0 -35.5 15 t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-600 q-21 0 -35.5 15t-14.5 35z" />
<glyph unicode="&#xe055;" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15 t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 950v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100 q-21 0 -35.5 15t-14.5 35z" />
<glyph unicode="&#xe056;" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15 t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM0 950v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15 t-14.5 35zM300 50v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800 q-21 0 -35.5 15t-14.5 35zM300 650v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM300 950v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15 h-800q-21 0 -35.5 15t-14.5 35z" />
<glyph unicode="&#xe057;" d="M-101 500v100h201v75l166 -125l-166 -125v75h-201zM300 0h100v1100h-100v-1100zM500 50q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 350q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35 v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 650q0 -20 14.5 -35t35.5 -15h500q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 950q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35v100 q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100z" />
<glyph unicode="&#xe058;" d="M1 50q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 350q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 650 q0 -20 14.5 -35t35.5 -15h500q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 950q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM801 0v1100h100v-1100 h-100zM934 550l167 -125v75h200v100h-200v75z" />
<glyph unicode="&#xe059;" d="M0 275v650q0 31 22 53t53 22h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53zM900 600l300 300v-600z" />
<glyph unicode="&#xe060;" d="M0 44v1012q0 18 13 31t31 13h1112q19 0 31.5 -13t12.5 -31v-1012q0 -18 -12.5 -31t-31.5 -13h-1112q-18 0 -31 13t-13 31zM100 263l247 182l298 -131l-74 156l293 318l236 -288v500h-1000v-737zM208 750q0 56 39 95t95 39t95 -39t39 -95t-39 -95t-95 -39t-95 39t-39 95z " />
<glyph unicode="&#xe062;" d="M148 745q0 124 60.5 231.5t165 172t226.5 64.5q123 0 227 -63t164.5 -169.5t60.5 -229.5t-73 -272q-73 -114 -166.5 -237t-150.5 -189l-57 -66q-10 9 -27 26t-66.5 70.5t-96 109t-104 135.5t-100.5 155q-63 139 -63 262zM342 772q0 -107 75.5 -182.5t181.5 -75.5 q107 0 182.5 75.5t75.5 182.5t-75.5 182t-182.5 75t-182 -75.5t-75 -181.5z" />
<glyph unicode="&#xe063;" d="M1 600q0 122 47.5 233t127.5 191t191 127.5t233 47.5t233 -47.5t191 -127.5t127.5 -191t47.5 -233t-47.5 -233t-127.5 -191t-191 -127.5t-233 -47.5t-233 47.5t-191 127.5t-127.5 191t-47.5 233zM173 600q0 -177 125.5 -302t301.5 -125v854q-176 0 -301.5 -125 t-125.5 -302z" />
<glyph unicode="&#xe064;" d="M117 406q0 94 34 186t88.5 172.5t112 159t115 177t87.5 194.5q21 -71 57.5 -142.5t76 -130.5t83 -118.5t82 -117t70 -116t50 -125.5t18.5 -136q0 -89 -39 -165.5t-102 -126.5t-140 -79.5t-156 -33.5q-114 6 -211.5 53t-161.5 139t-64 210zM243 414q14 -82 59.5 -136 t136.5 -80l16 98q-7 6 -18 17t-34 48t-33 77q-15 73 -14 143.5t10 122.5l9 51q-92 -110 -119.5 -185t-12.5 -156z" />
<glyph unicode="&#xe065;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5q366 -6 397 -14l-186 -186h-311q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v125l200 200v-225q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5 t-117.5 282.5zM436 341l161 50l412 412l-114 113l-405 -405zM995 1015l113 -113l113 113l-21 85l-92 28z" />
<glyph unicode="&#xe066;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h261l2 -80q-133 -32 -218 -120h-145q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-53q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5 zM423 524q30 38 81.5 64t103 35.5t99 14t77.5 3.5l29 -1v-209l360 324l-359 318v-216q-7 0 -19 -1t-48 -8t-69.5 -18.5t-76.5 -37t-76.5 -59t-62 -88t-39.5 -121.5z" />
<glyph unicode="&#xe067;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q61 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-169q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5 t-117.5 282.5zM342 632l283 -284l567 567l-137 137l-430 -431l-146 147z" />
<glyph unicode="&#xe068;" d="M0 603l300 296v-198h200v200h-200l300 300l295 -300h-195v-200h200v198l300 -296l-300 -300v198h-200v-200h195l-295 -300l-300 300h200v200h-200v-198z" />
<glyph unicode="&#xe069;" d="M200 50v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-1100l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5z" />
<glyph unicode="&#xe070;" d="M0 50v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-487l500 487v-1100l-500 488v-488l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5z" />
<glyph unicode="&#xe071;" d="M136 550l564 550v-487l500 487v-1100l-500 488v-488z" />
<glyph unicode="&#xe072;" d="M200 0l900 550l-900 550v-1100z" />
<glyph unicode="&#xe073;" d="M200 150q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v800q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5t-14.5 -35.5v-800zM600 150q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v800q0 21 -14.5 35.5t-35.5 14.5h-200 q-21 0 -35.5 -14.5t-14.5 -35.5v-800z" />
<glyph unicode="&#xe074;" d="M200 150q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35v800q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5v-800z" />
<glyph unicode="&#xe075;" d="M0 0v1100l500 -487v487l564 -550l-564 -550v488z" />
<glyph unicode="&#xe076;" d="M0 0v1100l500 -487v487l500 -487v437q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-500 -488v488z" />
<glyph unicode="&#xe077;" d="M300 0v1100l500 -487v437q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438z" />
<glyph unicode="&#xe078;" d="M100 250v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5zM100 500h1100l-550 564z" />
<glyph unicode="&#xe079;" d="M185 599l592 -592l240 240l-353 353l353 353l-240 240z" />
<glyph unicode="&#xe080;" d="M272 194l353 353l-353 353l241 240l572 -571l21 -22l-1 -1v-1l-592 -591z" />
<glyph unicode="&#xe081;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM300 500h200v-200h200v200h200v200h-200v200h-200v-200h-200v-200z" />
<glyph unicode="&#xe082;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM300 500h600v200h-600v-200z" />
<glyph unicode="&#xe083;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM246 459l213 -213l141 142l141 -142l213 213l-142 141l142 141l-213 212l-141 -141l-141 142l-212 -213l141 -141 z" />
<glyph unicode="&#xe084;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM270 551l276 -277l411 411l-175 174l-236 -236l-102 102z" />
<glyph unicode="&#xe085;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM364 700h143q4 0 11.5 -1t11 -1t6.5 3t3 9t1 11t3.5 8.5t3.5 6t5.5 4t6.5 2.5t9 1.5t9 0.5h11.5h12.5 q19 0 30 -10t11 -26q0 -22 -4 -28t-27 -22q-5 -1 -12.5 -3t-27 -13.5t-34 -27t-26.5 -46t-11 -68.5h200q5 3 14 8t31.5 25.5t39.5 45.5t31 69t14 94q0 51 -17.5 89t-42 58t-58.5 32t-58.5 15t-51.5 3q-50 0 -90.5 -12t-75 -38.5t-53.5 -74.5t-19 -114zM500 300h200v100h-200 v-100z" />
<glyph unicode="&#xe086;" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM400 300h400v100h-100v300h-300v-100h100v-200h-100v-100zM500 800h200v100h-200v-100z" />
<glyph unicode="&#xe087;" d="M0 500v200h195q31 125 98.5 199.5t206.5 100.5v200h200v-200q54 -20 113 -60t112.5 -105.5t71.5 -134.5h203v-200h-203q-25 -102 -116.5 -186t-180.5 -117v-197h-200v197q-140 27 -208 102.5t-98 200.5h-194zM290 500q24 -73 79.5 -127.5t130.5 -78.5v206h200v-206 q149 48 201 206h-201v200h200q-25 74 -75.5 127t-124.5 77v-204h-200v203q-75 -23 -130 -77t-79 -126h209v-200h-210z" />
<glyph unicode="&#xe088;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM356 465l135 135 l-135 135l109 109l135 -135l135 135l109 -109l-135 -135l135 -135l-109 -109l-135 135l-135 -135z" />
<glyph unicode="&#xe089;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM322 537l141 141 l87 -87l204 205l142 -142l-346 -345z" />
<glyph unicode="&#xe090;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -115 62 -215l568 567q-100 62 -216 62q-171 0 -292.5 -121.5t-121.5 -292.5zM391 245q97 -59 209 -59q171 0 292.5 121.5t121.5 292.5 q0 112 -59 209z" />
<glyph unicode="&#xe091;" d="M0 547l600 453v-300h600v-300h-600v-301z" />
<glyph unicode="&#xe092;" d="M0 400v300h600v300l600 -453l-600 -448v301h-600z" />
<glyph unicode="&#xe093;" d="M204 600l450 600l444 -600h-298v-600h-300v600h-296z" />
<glyph unicode="&#xe094;" d="M104 600h296v600h300v-600h298l-449 -600z" />
<glyph unicode="&#xe095;" d="M0 200q6 132 41 238.5t103.5 193t184 138t271.5 59.5v271l600 -453l-600 -448v301q-95 -2 -183 -20t-170 -52t-147 -92.5t-100 -135.5z" />
<glyph unicode="&#xe096;" d="M0 0v400l129 -129l294 294l142 -142l-294 -294l129 -129h-400zM635 777l142 -142l294 294l129 -129v400h-400l129 -129z" />
<glyph unicode="&#xe097;" d="M34 176l295 295l-129 129h400v-400l-129 130l-295 -295zM600 600v400l129 -129l295 295l142 -141l-295 -295l129 -130h-400z" />
<glyph unicode="&#xe101;" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM456 851l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5 t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5h-207q-21 0 -33 -14.5t-8 -34.5zM500 300h200v100h-200v-100z" />
<glyph unicode="&#xe102;" d="M0 800h100v-200h400v300h200v-300h400v200h100v100h-111q1 1 1 6.5t-1.5 15t-3.5 17.5l-34 172q-11 39 -41.5 63t-69.5 24q-32 0 -61 -17l-239 -144q-22 -13 -40 -35q-19 24 -40 36l-238 144q-33 18 -62 18q-39 0 -69.5 -23t-40.5 -61l-35 -177q-2 -8 -3 -18t-1 -15v-6 h-111v-100zM100 0h400v400h-400v-400zM200 900q-3 0 14 48t36 96l18 47l213 -191h-281zM700 0v400h400v-400h-400zM731 900l202 197q5 -12 12 -32.5t23 -64t25 -72t7 -28.5h-269z" />
<glyph unicode="&#xe103;" d="M0 -22v143l216 193q-9 53 -13 83t-5.5 94t9 113t38.5 114t74 124q47 60 99.5 102.5t103 68t127.5 48t145.5 37.5t184.5 43.5t220 58.5q0 -189 -22 -343t-59 -258t-89 -181.5t-108.5 -120t-122 -68t-125.5 -30t-121.5 -1.5t-107.5 12.5t-87.5 17t-56.5 7.5l-99 -55z M238.5 300.5q19.5 -6.5 86.5 76.5q55 66 367 234q70 38 118.5 69.5t102 79t99 111.5t86.5 148q22 50 24 60t-6 19q-7 5 -17 5t-26.5 -14.5t-33.5 -39.5q-35 -51 -113.5 -108.5t-139.5 -89.5l-61 -32q-369 -197 -458 -401q-48 -111 -28.5 -117.5z" />
<glyph unicode="&#xe104;" d="M111 408q0 -33 5 -63q9 -56 44 -119.5t105 -108.5q31 -21 64 -16t62 23.5t57 49.5t48 61.5t35 60.5q32 66 39 184.5t-13 157.5q79 -80 122 -164t26 -184q-5 -33 -20.5 -69.5t-37.5 -80.5q-10 -19 -14.5 -29t-12 -26t-9 -23.5t-3 -19t2.5 -15.5t11 -9.5t19.5 -5t30.5 2.5 t42 8q57 20 91 34t87.5 44.5t87 64t65.5 88.5t47 122q38 172 -44.5 341.5t-246.5 278.5q22 -44 43 -129q39 -159 -32 -154q-15 2 -33 9q-79 33 -120.5 100t-44 175.5t48.5 257.5q-13 -8 -34 -23.5t-72.5 -66.5t-88.5 -105.5t-60 -138t-8 -166.5q2 -12 8 -41.5t8 -43t6 -39.5 t3.5 -39.5t-1 -33.5t-6 -31.5t-13.5 -24t-21 -20.5t-31 -12q-38 -10 -67 13t-40.5 61.5t-15 81.5t10.5 75q-52 -46 -83.5 -101t-39 -107t-7.5 -85z" />
<glyph unicode="&#xe105;" d="M-61 600l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5t145.5 -23.5t132.5 -59t116.5 -83.5t97 -90t74.5 -85.5t49 -63.5t20 -30l26 -40l-26 -40q-6 -10 -20 -30t-49 -63.5t-74.5 -85.5t-97 -90t-116.5 -83.5t-132.5 -59t-145.5 -23.5 t-145.5 23.5t-132.5 59t-116.5 83.5t-97 90t-74.5 85.5t-49 63.5t-20 30zM120 600q7 -10 40.5 -58t56 -78.5t68 -77.5t87.5 -75t103 -49.5t125 -21.5t123.5 20t100.5 45.5t85.5 71.5t66.5 75.5t58 81.5t47 66q-1 1 -28.5 37.5t-42 55t-43.5 53t-57.5 63.5t-58.5 54 q49 -74 49 -163q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 85 46 158q-102 -87 -226 -258zM377 656q49 -124 154 -191l105 105q-37 24 -75 72t-57 84l-20 36z" />
<glyph unicode="&#xe106;" d="M-61 600l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5q61 0 121 -17l37 142h148l-314 -1200h-148l37 143q-82 21 -165 71.5t-140 102t-109.5 112t-72 88.5t-29.5 43zM120 600q210 -282 393 -336l37 141q-107 18 -178.5 101.5t-71.5 193.5 q0 85 46 158q-102 -87 -226 -258zM377 656q49 -124 154 -191l47 47l23 87q-30 28 -59 69t-44 68l-14 26zM780 161l38 145q22 15 44.5 34t46 44t40.5 44t41 50.5t33.5 43.5t33 44t24.5 34q-97 127 -140 175l39 146q67 -54 131.5 -125.5t87.5 -103.5t36 -52l26 -40l-26 -40 q-7 -12 -25.5 -38t-63.5 -79.5t-95.5 -102.5t-124 -100t-146.5 -79z" />
<glyph unicode="&#xe107;" d="M-97.5 34q13.5 -34 50.5 -34h1294q37 0 50.5 35.5t-7.5 67.5l-642 1056q-20 34 -48 36.5t-48 -29.5l-642 -1066q-21 -32 -7.5 -66zM155 200l445 723l445 -723h-345v100h-200v-100h-345zM500 600l100 -300l100 300v100h-200v-100z" />
<glyph unicode="&#xe108;" d="M100 262v41q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44t106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -91 100 -113v-64q0 -20 -13 -28.5t-32 0.5l-94 78h-222l-94 -78q-19 -9 -32 -0.5t-13 28.5 v64q0 22 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5z" />
<glyph unicode="&#xe109;" d="M0 50q0 -20 14.5 -35t35.5 -15h1000q21 0 35.5 15t14.5 35v750h-1100v-750zM0 900h1100v150q0 21 -14.5 35.5t-35.5 14.5h-150v100h-100v-100h-500v100h-100v-100h-150q-21 0 -35.5 -14.5t-14.5 -35.5v-150zM100 100v100h100v-100h-100zM100 300v100h100v-100h-100z M100 500v100h100v-100h-100zM300 100v100h100v-100h-100zM300 300v100h100v-100h-100zM300 500v100h100v-100h-100zM500 100v100h100v-100h-100zM500 300v100h100v-100h-100zM500 500v100h100v-100h-100zM700 100v100h100v-100h-100zM700 300v100h100v-100h-100zM700 500 v100h100v-100h-100zM900 100v100h100v-100h-100zM900 300v100h100v-100h-100zM900 500v100h100v-100h-100z" />
<glyph unicode="&#xe110;" d="M0 200v200h259l600 600h241v198l300 -295l-300 -300v197h-159l-600 -600h-341zM0 800h259l122 -122l141 142l-181 180h-341v-200zM678 381l141 142l122 -123h159v198l300 -295l-300 -300v197h-241z" />
<glyph unicode="&#xe111;" d="M0 400v600q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5z" />
<glyph unicode="&#xe112;" d="M100 600v200h300v-250q0 -113 6 -145q17 -92 102 -117q39 -11 92 -11q37 0 66.5 5.5t50 15.5t36 24t24 31.5t14 37.5t7 42t2.5 45t0 47v25v250h300v-200q0 -42 -3 -83t-15 -104t-31.5 -116t-58 -109.5t-89 -96.5t-129 -65.5t-174.5 -25.5t-174.5 25.5t-129 65.5t-89 96.5 t-58 109.5t-31.5 116t-15 104t-3 83zM100 900v300h300v-300h-300zM800 900v300h300v-300h-300z" />
<glyph unicode="&#xe113;" d="M-30 411l227 -227l352 353l353 -353l226 227l-578 579z" />
<glyph unicode="&#xe114;" d="M70 797l580 -579l578 579l-226 227l-353 -353l-352 353z" />
<glyph unicode="&#xe115;" d="M-198 700l299 283l300 -283h-203v-400h385l215 -200h-800v600h-196zM402 1000l215 -200h381v-400h-198l299 -283l299 283h-200v600h-796z" />
<glyph unicode="&#xe116;" d="M18 939q-5 24 10 42q14 19 39 19h896l38 162q5 17 18.5 27.5t30.5 10.5h94q20 0 35 -14.5t15 -35.5t-15 -35.5t-35 -14.5h-54l-201 -961q-2 -4 -6 -10.5t-19 -17.5t-33 -11h-31v-50q0 -20 -14.5 -35t-35.5 -15t-35.5 15t-14.5 35v50h-300v-50q0 -20 -14.5 -35t-35.5 -15 t-35.5 15t-14.5 35v50h-50q-21 0 -35.5 15t-14.5 35q0 21 14.5 35.5t35.5 14.5h535l48 200h-633q-32 0 -54.5 21t-27.5 43z" />
<glyph unicode="&#xe117;" d="M0 0v800h1200v-800h-1200zM0 900v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500v-100h-1200z" />
<glyph unicode="&#xe118;" d="M1 0l300 700h1200l-300 -700h-1200zM1 400v600h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500v-200h-1000z" />
<glyph unicode="&#xe119;" d="M302 300h198v600h-198l298 300l298 -300h-198v-600h198l-298 -300z" />
<glyph unicode="&#xe120;" d="M0 600l300 298v-198h600v198l300 -298l-300 -297v197h-600v-197z" />
<glyph unicode="&#xe121;" d="M0 100v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM31 400l172 739q5 22 23 41.5t38 19.5h672q19 0 37.5 -22.5t23.5 -45.5l172 -732h-1138zM800 100h100v100h-100v-100z M1000 100h100v100h-100v-100z" />
<glyph unicode="&#xe122;" d="M-101 600v50q0 24 25 49t50 38l25 13v-250l-11 5.5t-24 14t-30 21.5t-24 27.5t-11 31.5zM100 500v250v8v8v7t0.5 7t1.5 5.5t2 5t3 4t4.5 3.5t6 1.5t7.5 0.5h200l675 250v-850l-675 200h-38l47 -276q2 -12 -3 -17.5t-11 -6t-21 -0.5h-8h-83q-20 0 -34.5 14t-18.5 35 q-55 337 -55 351zM1100 200v850q0 21 14.5 35.5t35.5 14.5q20 0 35 -14.5t15 -35.5v-850q0 -20 -15 -35t-35 -15q-21 0 -35.5 15t-14.5 35z" />
<glyph unicode="&#xe123;" d="M74 350q0 21 13.5 35.5t33.5 14.5h18l117 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3 32t29 13h94q20 0 29 -10.5t3 -29.5q-18 -36 -18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q20 0 33.5 -14.5t13.5 -35.5q0 -20 -13 -40t-31 -27q-8 -3 -23 -8.5 t-65 -20t-103 -25t-132.5 -19.5t-158.5 -9q-125 0 -245.5 20.5t-178.5 40.5l-58 20q-18 7 -31 27.5t-13 40.5zM497 110q12 -49 40 -79.5t63 -30.5t63 30.5t39 79.5q-48 -6 -102 -6t-103 6z" />
<glyph unicode="&#xe124;" d="M21 445l233 -45l-78 -224l224 78l45 -233l155 179l155 -179l45 233l224 -78l-78 224l234 45l-180 155l180 156l-234 44l78 225l-224 -78l-45 233l-155 -180l-155 180l-45 -233l-224 78l78 -225l-233 -44l179 -156z" />
<glyph unicode="&#xe125;" d="M0 200h200v600h-200v-600zM300 275q0 -75 100 -75h61q124 -100 139 -100h250q46 0 83 57l238 344q29 31 29 74v100q0 44 -30.5 84.5t-69.5 40.5h-328q28 118 28 125v150q0 44 -30.5 84.5t-69.5 40.5h-50q-27 0 -51 -20t-38 -48l-96 -198l-145 -196q-20 -26 -20 -63v-400z M400 300v375l150 213l100 212h50v-175l-50 -225h450v-125l-250 -375h-214l-136 100h-100z" />
<glyph unicode="&#xe126;" d="M0 400v600h200v-600h-200zM300 525v400q0 75 100 75h61q124 100 139 100h250q46 0 83 -57l238 -344q29 -31 29 -74v-100q0 -44 -30.5 -84.5t-69.5 -40.5h-328q28 -118 28 -125v-150q0 -44 -30.5 -84.5t-69.5 -40.5h-50q-27 0 -51 20t-38 48l-96 198l-145 196 q-20 26 -20 63zM400 525l150 -212l100 -213h50v175l-50 225h450v125l-250 375h-214l-136 -100h-100v-375z" />
<glyph unicode="&#xe127;" d="M8 200v600h200v-600h-200zM308 275v525q0 17 14 35.5t28 28.5l14 9l362 230q14 6 25 6q17 0 29 -12l109 -112q14 -14 14 -34q0 -18 -11 -32l-85 -121h302q85 0 138.5 -38t53.5 -110t-54.5 -111t-138.5 -39h-107l-130 -339q-7 -22 -20.5 -41.5t-28.5 -19.5h-341 q-7 0 -90 81t-83 94zM408 289l100 -89h293l131 339q6 21 19.5 41t28.5 20h203q16 0 25 15t9 36q0 20 -9 34.5t-25 14.5h-457h-6.5h-7.5t-6.5 0.5t-6 1t-5 1.5t-5.5 2.5t-4 4t-4 5.5q-5 12 -5 20q0 14 10 27l147 183l-86 83l-339 -236v-503z" />
<glyph unicode="&#xe128;" d="M-101 651q0 72 54 110t139 38l302 -1l-85 121q-11 16 -11 32q0 21 14 34l109 113q13 12 29 12q11 0 25 -6l365 -230q7 -4 17 -10.5t26.5 -26t16.5 -36.5v-526q0 -13 -86 -93.5t-94 -80.5h-341q-16 0 -29.5 20t-19.5 41l-130 339h-107q-84 0 -139 39t-55 111zM-1 601h222 q15 0 28.5 -20.5t19.5 -40.5l131 -339h293l107 89v502l-343 237l-87 -83l145 -184q10 -11 10 -26q0 -11 -5 -20q-1 -3 -3.5 -5.5l-4 -4t-5 -2.5t-5.5 -1.5t-6.5 -1t-6.5 -0.5h-7.5h-6.5h-476v-100zM1000 201v600h200v-600h-200z" />
<glyph unicode="&#xe129;" d="M97 719l230 -363q4 -6 10.5 -15.5t26 -25t36.5 -15.5h525q13 0 94 83t81 90v342q0 15 -20 28.5t-41 19.5l-339 131v106q0 84 -39 139t-111 55t-110 -53.5t-38 -138.5v-302l-121 84q-15 12 -33.5 11.5t-32.5 -13.5l-112 -110q-22 -22 -6 -53zM172 739l83 86l183 -146 q22 -18 47 -5q3 1 5.5 3.5l4 4t2.5 5t1.5 5.5t1 6.5t0.5 6.5v7.5v6.5v456q0 22 25 31t50 -0.5t25 -30.5v-202q0 -16 20 -29.5t41 -19.5l339 -130v-294l-89 -100h-503zM400 0v200h600v-200h-600z" />
<glyph unicode="&#xe130;" d="M2 585q-16 -31 6 -53l112 -110q13 -13 32 -13.5t34 10.5l121 85q0 -51 -0.5 -153.5t-0.5 -148.5q0 -84 38.5 -138t110.5 -54t111 55t39 139v106l339 131q20 6 40.5 19.5t20.5 28.5v342q0 7 -81 90t-94 83h-525q-17 0 -35.5 -14t-28.5 -28l-10 -15zM77 565l236 339h503 l89 -100v-294l-340 -130q-20 -6 -40 -20t-20 -29v-202q0 -22 -25 -31t-50 0t-25 31v456v14.5t-1.5 11.5t-5 12t-9.5 7q-24 13 -46 -5l-184 -146zM305 1104v200h600v-200h-600z" />
<glyph unicode="&#xe131;" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM298 701l2 -201h300l-2 -194l402 294l-402 298v-197h-300z" />
<glyph unicode="&#xe132;" d="M0 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t231.5 47.5q122 0 232.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-218 -217.5t-300 -80t-299.5 80t-217.5 217.5t-80 299.5zM200 600l402 -294l-2 194h300l2 201h-300v197z" />
<glyph unicode="&#xe133;" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM300 600h200v-300h200v300h200l-300 400z" />
<glyph unicode="&#xe134;" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM300 600l300 -400l300 400h-200v300h-200v-300h-200z" />
<glyph unicode="&#xe135;" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q121 0 231.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM254 780q-8 -33 5.5 -92.5t7.5 -87.5q0 -9 17 -44t16 -60 q12 0 23 -5.5t23 -15t20 -13.5q24 -12 108 -42q22 -8 53 -31.5t59.5 -38.5t57.5 -11q8 -18 -15 -55t-20 -57q42 -71 87 -80q0 -6 -3 -15.5t-3.5 -14.5t4.5 -17q104 -3 221 112q30 29 47 47t34.5 49t20.5 62q-14 9 -37 9.5t-36 7.5q-14 7 -49 15t-52 19q-9 0 -39.5 -0.5 t-46.5 -1.5t-39 -6.5t-39 -16.5q-50 -35 -66 -12q-4 2 -3.5 25.5t0.5 25.5q-6 13 -26.5 17t-24.5 7q2 22 -2 41t-16.5 28t-38.5 -20q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q12 -19 32 -37.5t34 -27.5l14 -8q0 3 9.5 39.5t5.5 57.5 q-4 23 14.5 44.5t22.5 31.5q5 14 10 35t8.5 31t15.5 22.5t34 21.5q-6 18 10 37q8 0 23.5 -1.5t24.5 -1.5t20.5 4.5t20.5 15.5q-10 23 -30.5 42.5t-38 30t-49 26.5t-43.5 23q11 39 2 44q31 -13 58 -14.5t39 3.5l11 4q7 36 -16.5 53.5t-64.5 28.5t-56 23q-19 -3 -37 0 q-15 -12 -36.5 -21t-34.5 -12t-44 -8t-39 -6q-15 -3 -45.5 0.5t-45.5 -2.5q-21 -7 -52 -26.5t-34 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -90.5t-29.5 -79.5zM518 916q3 12 16 30t16 25q10 -10 18.5 -10t14 6t14.5 14.5t16 12.5q0 -24 17 -66.5t17 -43.5 q-9 2 -31 5t-36 5t-32 8t-30 14zM692 1003h1h-1z" />
<glyph unicode="&#xe136;" d="M0 164.5q0 21.5 15 37.5l600 599q-33 101 6 201.5t135 154.5q164 92 306 -9l-259 -138l145 -232l251 126q13 -175 -151 -267q-123 -70 -253 -23l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5z" />
<glyph unicode="&#xe137;" horiz-adv-x="1220" d="M0 196v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM0 596v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5zM0 996v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM600 596h500v100h-500v-100zM800 196h300v100h-300v-100zM900 996h200v100h-200v-100z" />
<glyph unicode="&#xe138;" d="M100 1100v100h1000v-100h-1000zM150 1000h900l-350 -500v-300l-200 -200v500z" />
<glyph unicode="&#xe139;" d="M0 200v200h1200v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM0 500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500z M500 1000h200v100h-200v-100z" />
<glyph unicode="&#xe140;" d="M0 0v400l129 -129l200 200l142 -142l-200 -200l129 -129h-400zM0 800l129 129l200 -200l142 142l-200 200l129 129h-400v-400zM729 329l142 142l200 -200l129 129v-400h-400l129 129zM729 871l200 200l-129 129h400v-400l-129 129l-200 -200z" />
<glyph unicode="&#xe141;" d="M0 596q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM182 596q0 -172 121.5 -293t292.5 -121t292.5 121t121.5 293q0 171 -121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM291 655 q0 23 15.5 38.5t38.5 15.5t39 -16t16 -38q0 -23 -16 -39t-39 -16q-22 0 -38 16t-16 39zM400 850q0 22 16 38.5t39 16.5q22 0 38 -16t16 -39t-16 -39t-38 -16q-23 0 -39 16.5t-16 38.5zM514 609q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 22 16 38.5t39 16.5 q22 0 38 -16t16 -39t-16 -39t-38 -16q-14 0 -29 10l-55 -145q17 -22 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5zM800 655q0 22 16 38t39 16t38.5 -15.5t15.5 -38.5t-16 -39t-38 -16q-23 0 -39 16t-16 39z" />
<glyph unicode="&#xe142;" d="M-40 375q-13 -95 35 -173q35 -57 94 -89t129 -32q63 0 119 28q33 16 65 40.5t52.5 45.5t59.5 64q40 44 57 61l394 394q35 35 47 84t-3 96q-27 87 -117 104q-20 2 -29 2q-46 0 -78.5 -16.5t-67.5 -51.5l-389 -396l-7 -7l69 -67l377 373q20 22 39 38q23 23 50 23 q38 0 53 -36q16 -39 -20 -75l-547 -547q-52 -52 -125 -52q-55 0 -100 33t-54 96q-5 35 2.5 66t31.5 63t42 50t56 54q24 21 44 41l348 348q52 52 82.5 79.5t84 54t107.5 26.5q25 0 48 -4q95 -17 154 -94.5t51 -175.5q-7 -101 -98 -192l-252 -249l-253 -256l7 -7l69 -60 l517 511q67 67 95 157t11 183q-16 87 -67 154t-130 103q-69 33 -152 33q-107 0 -197 -55q-40 -24 -111 -95l-512 -512q-68 -68 -81 -163z" />
<glyph unicode="&#xe143;" d="M80 784q0 131 98.5 229.5t230.5 98.5q143 0 241 -129q103 129 246 129q129 0 226 -98.5t97 -229.5q0 -46 -17.5 -91t-61 -99t-77 -89.5t-104.5 -105.5q-197 -191 -293 -322l-17 -23l-16 23q-43 58 -100 122.5t-92 99.5t-101 100q-71 70 -104.5 105.5t-77 89.5t-61 99 t-17.5 91zM250 784q0 -27 30.5 -70t61.5 -75.5t95 -94.5l22 -22q93 -90 190 -201q82 92 195 203l12 12q64 62 97.5 97t64.5 79t31 72q0 71 -48 119.5t-105 48.5q-74 0 -132 -83l-118 -171l-114 174q-51 80 -123 80q-60 0 -109.5 -49.5t-49.5 -118.5z" />
<glyph unicode="&#xe144;" d="M57 353q0 -95 66 -159l141 -142q68 -66 159 -66q93 0 159 66l283 283q66 66 66 159t-66 159l-141 141q-8 9 -19 17l-105 -105l212 -212l-389 -389l-247 248l95 95l-18 18q-46 45 -75 101l-55 -55q-66 -66 -66 -159zM269 706q0 -93 66 -159l141 -141q7 -7 19 -17l105 105 l-212 212l389 389l247 -247l-95 -96l18 -17q47 -49 77 -100l29 29q35 35 62.5 88t27.5 96q0 93 -66 159l-141 141q-66 66 -159 66q-95 0 -159 -66l-283 -283q-66 -64 -66 -159z" />
<glyph unicode="&#xe145;" d="M200 100v953q0 21 30 46t81 48t129 38t163 15t162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5zM300 300h600v700h-600v-700zM496 150q0 -43 30.5 -73.5t73.5 -30.5t73.5 30.5t30.5 73.5t-30.5 73.5t-73.5 30.5 t-73.5 -30.5t-30.5 -73.5z" />
<glyph unicode="&#xe146;" d="M0 0l303 380l207 208l-210 212h300l267 279l-35 36q-15 14 -15 35t15 35q14 15 35 15t35 -15l283 -282q15 -15 15 -36t-15 -35q-14 -15 -35 -15t-35 15l-36 35l-279 -267v-300l-212 210l-208 -207z" />
<glyph unicode="&#xe148;" d="M295 433h139q5 -77 48.5 -126.5t117.5 -64.5v335q-6 1 -15.5 4t-11.5 3q-46 14 -79 26.5t-72 36t-62.5 52t-40 72.5t-16.5 99q0 92 44 159.5t109 101t144 40.5v78h100v-79q38 -4 72.5 -13.5t75.5 -31.5t71 -53.5t51.5 -84t24.5 -118.5h-159q-8 72 -35 109.5t-101 50.5 v-307l64 -14q34 -7 64 -16.5t70 -31.5t67.5 -52t47.5 -80.5t20 -112.5q0 -139 -89 -224t-244 -96v-77h-100v78q-152 17 -237 104q-40 40 -52.5 93.5t-15.5 139.5zM466 889q0 -29 8 -51t16.5 -34t29.5 -22.5t31 -13.5t38 -10q7 -2 11 -3v274q-61 -8 -97.5 -37.5t-36.5 -102.5 zM700 237q170 18 170 151q0 64 -44 99.5t-126 60.5v-311z" />
<glyph unicode="&#xe149;" d="M100 600v100h166q-24 49 -44 104q-10 26 -14.5 55.5t-3 72.5t25 90t68.5 87q97 88 263 88q129 0 230 -89t101 -208h-153q0 52 -34 89.5t-74 51.5t-76 14q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -28 16.5 -69.5t28 -62.5t41.5 -72h241v-100h-197q8 -50 -2.5 -115 t-31.5 -94q-41 -59 -99 -113q35 11 84 18t70 7q33 1 103 -16t103 -17q76 0 136 30l50 -147q-41 -25 -80.5 -36.5t-59 -13t-61.5 -1.5q-23 0 -128 33t-155 29q-39 -4 -82 -17t-66 -25l-24 -11l-55 145l16.5 11t15.5 10t13.5 9.5t14.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221z" />
<glyph unicode="&#xe150;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM602 900l298 300l298 -300h-198v-900h-200v900h-198z" />
<glyph unicode="&#xe151;" d="M2 300h198v900h200v-900h198l-298 -300zM700 0v200h100v-100h200v-100h-300zM700 400v100h300v-200h-99v-100h-100v100h99v100h-200zM700 700v500h300v-500h-100v100h-100v-100h-100zM801 900h100v200h-100v-200z" />
<glyph unicode="&#xe152;" d="M2 300h198v900h200v-900h198l-298 -300zM700 0v500h300v-500h-100v100h-100v-100h-100zM700 700v200h100v-100h200v-100h-300zM700 1100v100h300v-200h-99v-100h-100v100h99v100h-200zM801 200h100v200h-100v-200z" />
<glyph unicode="&#xe153;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM800 100v400h300v-500h-100v100h-200zM800 1100v100h200v-500h-100v400h-100zM901 200h100v200h-100v-200z" />
<glyph unicode="&#xe154;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM800 400v100h200v-500h-100v400h-100zM800 800v400h300v-500h-100v100h-200zM901 900h100v200h-100v-200z" />
<glyph unicode="&#xe155;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM700 100v200h500v-200h-500zM700 400v200h400v-200h-400zM700 700v200h300v-200h-300zM700 1000v200h200v-200h-200z" />
<glyph unicode="&#xe156;" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM700 100v200h200v-200h-200zM700 400v200h300v-200h-300zM700 700v200h400v-200h-400zM700 1000v200h500v-200h-500z" />
<glyph unicode="&#xe157;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q162 0 281 -118.5t119 -281.5v-300q0 -165 -118.5 -282.5t-281.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500z" />
<glyph unicode="&#xe158;" d="M0 400v300q0 163 119 281.5t281 118.5h300q165 0 282.5 -117.5t117.5 -282.5v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-163 0 -281.5 117.5t-118.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM400 300l333 250l-333 250v-500z" />
<glyph unicode="&#xe159;" d="M0 400v300q0 163 117.5 281.5t282.5 118.5h300q163 0 281.5 -119t118.5 -281v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM300 700l250 -333l250 333h-500z" />
<glyph unicode="&#xe160;" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q165 0 282.5 -117.5t117.5 -282.5v-300q0 -162 -118.5 -281t-281.5 -119h-300q-165 0 -282.5 118.5t-117.5 281.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM300 400h500l-250 333z" />
<glyph unicode="&#xe161;" d="M0 400v300h300v200l400 -350l-400 -350v200h-300zM500 0v200h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-500v200h400q165 0 282.5 -117.5t117.5 -282.5v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-400z" />
<glyph unicode="&#xe162;" d="M217 519q8 -19 31 -19h302q-155 -438 -160 -458q-5 -21 4 -32l9 -8h9q14 0 26 15q11 13 274.5 321.5t264.5 308.5q14 19 5 36q-8 17 -31 17l-301 -1q1 4 78 219.5t79 227.5q2 15 -5 27l-9 9h-9q-15 0 -25 -16q-4 -6 -98 -111.5t-228.5 -257t-209.5 -237.5q-16 -19 -6 -41 z" />
<glyph unicode="&#xe163;" d="M0 400q0 -165 117.5 -282.5t282.5 -117.5h300q47 0 100 15v185h-500q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5h500v185q-14 4 -114 7.5t-193 5.5l-93 2q-165 0 -282.5 -117.5t-117.5 -282.5v-300zM600 400v300h300v200l400 -350l-400 -350v200h-300z " />
<glyph unicode="&#xe164;" d="M0 400q0 -165 117.5 -282.5t282.5 -117.5h300q163 0 281.5 117.5t118.5 282.5v98l-78 73l-122 -123v-148q0 -41 -29.5 -70.5t-70.5 -29.5h-500q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5h156l118 122l-74 78h-100q-165 0 -282.5 -117.5t-117.5 -282.5 v-300zM496 709l353 342l-149 149h500v-500l-149 149l-342 -353z" />
<glyph unicode="&#xe165;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM406 600 q0 80 57 137t137 57t137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137z" />
<glyph unicode="&#xe166;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 800l445 -500l450 500h-295v400h-300v-400h-300zM900 150h100v50h-100v-50z" />
<glyph unicode="&#xe167;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 700h300v-300h300v300h295l-445 500zM900 150h100v50h-100v-50z" />
<glyph unicode="&#xe168;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 705l305 -305l596 596l-154 155l-442 -442l-150 151zM900 150h100v50h-100v-50z" />
<glyph unicode="&#xe169;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 988l97 -98l212 213l-97 97zM200 400l697 1l3 699l-250 -239l-149 149l-212 -212l149 -149zM900 150h100v50h-100v-50z" />
<glyph unicode="&#xe170;" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM200 612l212 -212l98 97l-213 212zM300 1200l239 -250l-149 -149l212 -212l149 148l249 -237l-1 697zM900 150h100v50h-100v-50z" />
<glyph unicode="&#xe171;" d="M23 415l1177 784v-1079l-475 272l-310 -393v416h-392zM494 210l672 938l-672 -712v-226z" />
<glyph unicode="&#xe172;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-850q0 -21 -15 -35.5t-35 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 1000h100v200h-100v-200z" />
<glyph unicode="&#xe173;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-218l-276 -275l-120 120l-126 -127h-378v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM581 306l123 123l120 -120l353 352l123 -123l-475 -476zM600 1000h100v200h-100v-200z" />
<glyph unicode="&#xe174;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-269l-103 -103l-170 170l-298 -298h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 1000h100v200h-100v-200zM700 133l170 170l-170 170l127 127l170 -170l170 170l127 -128l-170 -169l170 -170 l-127 -127l-170 170l-170 -170z" />
<glyph unicode="&#xe175;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-300h-400v-200h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 300l300 -300l300 300h-200v300h-200v-300h-200zM600 1000v200h100v-200h-100z" />
<glyph unicode="&#xe176;" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-402l-200 200l-298 -298h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 300h200v-300h200v300h200l-300 300zM600 1000v200h100v-200h-100z" />
<glyph unicode="&#xe177;" d="M0 250q0 -21 14.5 -35.5t35.5 -14.5h1100q21 0 35.5 14.5t14.5 35.5v550h-1200v-550zM0 900h1200v150q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-150zM100 300v200h400v-200h-400z" />
<glyph unicode="&#xe178;" d="M0 400l300 298v-198h400v-200h-400v-198zM100 800v200h100v-200h-100zM300 800v200h100v-200h-100zM500 800v200h400v198l300 -298l-300 -298v198h-400zM800 300v200h100v-200h-100zM1000 300h100v200h-100v-200z" />
<glyph unicode="&#xe179;" d="M100 700v400l50 100l50 -100v-300h100v300l50 100l50 -100v-300h100v300l50 100l50 -100v-400l-100 -203v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447zM800 597q0 -29 10.5 -55.5t25 -43t29 -28.5t25.5 -18l10 -5v-397q0 -21 14.5 -35.5 t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v1106q0 31 -18 40.5t-44 -7.5l-276 -116q-25 -17 -43.5 -51.5t-18.5 -65.5v-359z" />
<glyph unicode="&#xe180;" d="M100 0h400v56q-75 0 -87.5 6t-12.5 44v394h500v-394q0 -38 -12.5 -44t-87.5 -6v-56h400v56q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v888q0 22 25 34.5t50 13.5l25 2v56h-400v-56q75 0 87.5 -6t12.5 -44v-394h-500v394q0 38 12.5 44t87.5 6v56h-400v-56q4 0 11 -0.5 t24 -3t30 -7t24 -15t11 -24.5v-888q0 -22 -25 -34.5t-50 -13.5l-25 -2v-56z" />
<glyph unicode="&#xe181;" d="M0 300q0 -41 29.5 -70.5t70.5 -29.5h300q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-300q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM100 100h400l200 200h105l295 98v-298h-425l-100 -100h-375zM100 300v200h300v-200h-300zM100 600v200h300v-200h-300z M100 1000h400l200 -200v-98l295 98h105v200h-425l-100 100h-375zM700 402v163l400 133v-163z" />
<glyph unicode="&#xe182;" d="M16.5 974.5q0.5 -21.5 16 -90t46.5 -140t104 -177.5t175 -208q103 -103 207.5 -176t180 -103.5t137 -47t92.5 -16.5l31 1l163 162q17 18 13.5 41t-22.5 37l-192 136q-19 14 -45 12t-42 -19l-118 -118q-142 101 -268 227t-227 268l118 118q17 17 20 41.5t-11 44.5 l-139 194q-14 19 -36.5 22t-40.5 -14l-162 -162q-1 -11 -0.5 -32.5z" />
<glyph unicode="&#xe183;" d="M0 50v212q0 20 10.5 45.5t24.5 39.5l365 303v50q0 4 1 10.5t12 22.5t30 28.5t60 23t97 10.5t97 -10t60 -23.5t30 -27.5t12 -24l1 -10v-50l365 -303q14 -14 24.5 -39.5t10.5 -45.5v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-20 0 -35 14.5t-15 35.5zM0 712 q0 -21 14.5 -33.5t34.5 -8.5l202 33q20 4 34.5 21t14.5 38v146q141 24 300 24t300 -24v-146q0 -21 14.5 -38t34.5 -21l202 -33q20 -4 34.5 8.5t14.5 33.5v200q-6 8 -19 20.5t-63 45t-112 57t-171 45t-235 20.5q-92 0 -175 -10.5t-141.5 -27t-108.5 -36.5t-81.5 -40 t-53.5 -36.5t-31 -27.5l-9 -10v-200z" />
<glyph unicode="&#xe184;" d="M100 0v100h1100v-100h-1100zM175 200h950l-125 150v250l100 100v400h-100v-200h-100v200h-200v-200h-100v200h-200v-200h-100v200h-100v-400l100 -100v-250z" />
<glyph unicode="&#xe185;" d="M100 0h300v400q0 41 -29.5 70.5t-70.5 29.5h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-400zM500 0v1000q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-1000h-300zM900 0v700q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-700h-300z" />
<glyph unicode="&#xe186;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v300h-200v100h200v100h-300v-300h200v-100h-200v-100zM600 300h200v100h100v300h-100v100h-200v-500 zM700 400v300h100v-300h-100z" />
<glyph unicode="&#xe187;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h100v200h100v-200h100v500h-100v-200h-100v200h-100v-500zM600 300h200v100h100v300h-100v100h-200v-500 zM700 400v300h100v-300h-100z" />
<glyph unicode="&#xe188;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v100h-200v300h200v100h-300v-500zM600 300h300v100h-200v300h200v100h-300v-500z" />
<glyph unicode="&#xe189;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 550l300 -150v300zM600 400l300 150l-300 150v-300z" />
<glyph unicode="&#xe190;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300v500h700v-500h-700zM300 400h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130v-300zM575 549 q0 -65 27 -107t68 -42h130v300h-130q-38 0 -66.5 -43t-28.5 -108z" />
<glyph unicode="&#xe191;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v300h-200v100h200v100h-300v-300h200v-100h-200v-100zM601 300h100v100h-100v-100zM700 700h100 v-400h100v500h-200v-100z" />
<glyph unicode="&#xe192;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v400h-200v100h-100v-500zM301 400v200h100v-200h-100zM601 300h100v100h-100v-100zM700 700h100 v-400h100v500h-200v-100z" />
<glyph unicode="&#xe193;" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 700v100h300v-300h-99v-100h-100v100h99v200h-200zM201 300v100h100v-100h-100zM601 300v100h100v-100h-100z M700 700v100h200v-500h-100v400h-100z" />
<glyph unicode="&#xe194;" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM400 500v200 l100 100h300v-100h-300v-200h300v-100h-300z" />
<glyph unicode="&#xe195;" d="M0 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM182 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM400 400v400h300 l100 -100v-100h-100v100h-200v-100h200v-100h-200v-100h-100zM700 400v100h100v-100h-100z" />
<glyph unicode="&#xe197;" d="M-14 494q0 -80 56.5 -137t135.5 -57h222v300h400v-300h128q120 0 205 86.5t85 207.5t-85 207t-205 86q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5zM300 200h200v300h200v-300h200 l-300 -300z" />
<glyph unicode="&#xe198;" d="M-14 494q0 -80 56.5 -137t135.5 -57h8l414 414l403 -403q94 26 154.5 104.5t60.5 178.5q0 120 -85 206.5t-205 86.5q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5zM300 200l300 300 l300 -300h-200v-300h-200v300h-200z" />
<glyph unicode="&#xe199;" d="M100 200h400v-155l-75 -45h350l-75 45v155h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170z" />
<glyph unicode="&#xe200;" d="M121 700q0 -53 28.5 -97t75.5 -65q-4 -16 -4 -38q0 -74 52.5 -126.5t126.5 -52.5q56 0 100 30v-306l-75 -45h350l-75 45v306q46 -30 100 -30q74 0 126.5 52.5t52.5 126.5q0 24 -9 55q50 32 79.5 83t29.5 112q0 90 -61.5 155.5t-150.5 71.5q-26 89 -99.5 145.5 t-167.5 56.5q-116 0 -197.5 -81.5t-81.5 -197.5q0 -4 1 -11.5t1 -11.5q-14 2 -23 2q-74 0 -126.5 -52.5t-52.5 -126.5z" />
</font>
</defs></svg>

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Binary file not shown.

View File

@ -1,14 +1,149 @@
{% extends "!layout.html" %} {% extends "!layout.html" %}
{% block extrahead %}
<meta name="description" content="Small, safe and fast formatting library">
<meta name="keywords" content="C++, formatting, printf, string, library">
<meta name="author" content="Victor Zverovich">
<link rel="stylesheet" href="_static/fmt.css">
{# Google Analytics #}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();
a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;
a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-20116650-4', 'fmtlib.net');
ga('send', 'pageview');
</script>
{% endblock %}
{%- macro searchform(classes, button) %}
<form class="{{classes}}" role="search" action="{{ pathto('search') }}"
method="get">
<div class="form-group">
<input type="text" name="q" class="form-control"
{{ 'placeholder="Search"' if not button }} >
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
{% if button %}
<input type="submit" class="btn btn-default" value="search">
{% endif %}
</form>
{%- endmacro %}
{% block header %}
<nav class="navbar navbar-inverse">
<div class="tb-container">
<div class="row">
<div class="navbar-content">
{# Brand and toggle get grouped for better mobile display #}
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed"
data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">{fmt}</a>
</div>
{# Collect the nav links, forms, and other content for toggling #}
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"
role="button" aria-expanded="false">{{ version }}
<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
{% for v in versions.split(',') %}
<li><a href="https://fmt.dev/{{v}}">{{v}}</a></li>
{% endfor %}
</ul>
</li>
{% for name in ['Contents', 'Usage', 'API', 'Syntax'] %}
{% if pagename == name.lower() %}
<li class="active"><a href="{{name.lower()}}.html">{{name}}
<span class="sr-only">(current)</span></a></li>
{%else%}
<li><a href="{{name.lower()}}.html">{{name}}</a></li>
{%endif%}
{% endfor %}
</ul>
{% if pagename != 'search' %}
{{ searchform('navbar-form navbar-right', False) }}
{%endif%}
</div> {# /.navbar-collapse #}
</div> {# /.col-md-offset-2 #}
</div> {# /.row #}
</div> {# /.tb-container #}
</nav>
{% if pagename == "index" %}
{% set download_url = 'https://github.com/fmtlib/fmt/releases/download' %}
<div class="jumbotron">
<div class="tb-container">
<h1>{fmt}</h1>
<p class="lead">Small, safe and fast formatting library</p>
<div class="btn-group" role="group">
{% set name = 'fmt' if version.split('.')[0]|int >= 3 else 'cppformat' %}
<a class="btn btn-success"
href="{{download_url}}/{{version}}/{{name}}-{{version}}.zip">
<span class="glyphicon glyphicon-download"></span> Download
</a>
<button type="button" class="btn btn-success dropdown-toggle"
data-toggle="dropdown"><span class="caret"></span></button>
<ul class="dropdown-menu">
{% for v in versions.split(',') %}
{% set name = 'fmt' if v.split('.')[0]|int >= 3 else 'cppformat' %}
<li><a href="{{download_url}}/{{v}}/{{name}}-{{v}}.zip">Version {{v}}
</a></li>
{% endfor %}
</ul>
</div>
</div>
</div>
{% endif %}
{% endblock %}
{# Disable relbars. #}
{% block relbar1 %}
{% endblock %}
{% block relbar2 %}
{% endblock %}
{% block content %}
<div class="tb-container">
<div class="row">
{# Sidebar is currently disabled.
<div class="bs-sidebar">
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
{%- block sidebarlogo %}
{%- if logo %}
<p class="logo"><a href="{{ pathto(master_doc) }}">
<img class="logo" src="{{ pathto('_static/' + logo, 1) }}"
alt="Logo"/>
</a></p>
{%- endif %}
{%- endblock %}
{%- for sidebartemplate in sidebars %}
{%- include sidebartemplate %}
{%- endfor %}
</div>
</div>
</div>
#}
<div class="content">
{% block body %} {% endblock %}
</div>
</div>
</div>
{% endblock %}
{% block footer %} {% block footer %}
{{ super() }} {{ super() }}
<!-- Google Analytics --> {# Placed at the end of the document so the pages load faster. #}
<script> <script src="_static/bootstrap.min.js"></script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ {% endblock %}
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-20116650-4', 'cppformat.github.io');
ga('send', 'pageview');
</script>
{% endblock %}

55
doc/_templates/search.html vendored Normal file
View File

@ -0,0 +1,55 @@
{#
basic/search.html
~~~~~~~~~~~~~~~~~
Template for the search page.
:copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- extends "layout.html" %}
{% set title = _('Search') %}
{% set script_files = script_files + ['_static/searchtools.js'] %}
{% block extrahead %}
<script type="text/javascript">
jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); });
</script>
{# this is used when loading the search index using $.ajax fails,
such as on Chrome for documents on localhost #}
<script type="text/javascript" id="searchindexloader"></script>
{{ super() }}
{% endblock %}
{% block body %}
<h1 id="search-documentation">{{ _('Search') }}</h1>
<div id="fallback" class="admonition warning">
<script type="text/javascript">$('#fallback').hide();</script>
<p>
{% trans %}Please activate JavaScript to enable the search
functionality.{% endtrans %}
</p>
</div>
<p>
{% trans %}From here you can search these documents. Enter your search
words into the box below and click "search". Note that the search
function will automatically search for all of the words. Pages
containing fewer words won't appear in the result list.{% endtrans %}
</p>
{{ searchform('form-inline', True) }}
{% if search_performed %}
<h2>{{ _('Search Results') }}</h2>
{% if not search_results %}
<p>{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}</p>
{% endif %}
{% endif %}
<div id="search-results">
{% if search_results %}
<ul>
{% for href, caption, context in search_results %}
<li><a href="{{ pathto(item.href) }}">{{ caption }}</a>
<div class="context">{{ context|e }}</div>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
{% endblock %}

408
doc/api.rst Normal file
View File

@ -0,0 +1,408 @@
.. _string-formatting-api:
*************
API Reference
*************
The {fmt} library API consists of the following parts:
* :ref:`fmt/core.h <core-api>`: the core API providing argument handling
facilities and a lightweight subset of formatting functions
* :ref:`fmt/format.h <format-api>`: the full format API providing compile-time
format string checks, output iterator and user-defined type support
* :ref:`fmt/ranges.h <ranges-api>`: additional formatting support for ranges
and tuples
* :ref:`fmt/chrono.h <chrono-api>`: date and time formatting
* :ref:`fmt/ostream.h <ostream-api>`: ``std::ostream`` support
* :ref:`fmt/printf.h <printf-api>`: ``printf`` formatting
All functions and types provided by the library reside in namespace ``fmt`` and
macros have prefix ``FMT_`` or ``fmt``.
.. _core-api:
Core API
========
``fmt/core.h`` defines the core API which provides argument handling facilities
and a lightweight subset of formatting functions. In the header-only mode
include ``fmt/format.h`` instead of ``fmt/core.h``.
The following functions use :ref:`format string syntax <syntax>`
similar to that of Python's `str.format
<http://docs.python.org/3/library/stdtypes.html#str.format>`_.
They take *format_str* and *args* as arguments.
*format_str* is a format string that contains literal text and replacement
fields surrounded by braces ``{}``. The fields are replaced with formatted
arguments in the resulting string. A function taking *format_str* doesn't
participate in an overload resolution if the latter is not a string.
*args* is an argument list representing objects to be formatted.
.. _format:
.. doxygenfunction:: format(const S&, Args&&...)
.. doxygenfunction:: vformat(const S&, basic_format_args<buffer_context<Char>>)
.. _print:
.. doxygenfunction:: print(const S&, Args&&...)
.. doxygenfunction:: vprint(string_view, format_args)
.. doxygenfunction:: print(std::FILE *, const S&, Args&&...)
.. doxygenfunction:: vprint(std::FILE *, string_view, format_args)
.. doxygenfunction:: vprint(std::FILE *, wstring_view, wformat_args)
Named Arguments
---------------
.. doxygenfunction:: fmt::arg(const S&, const T&)
Named arguments are not supported in compile-time checks at the moment.
Argument Lists
--------------
.. doxygenfunction:: fmt::make_format_args(const Args&...)
.. doxygenclass:: fmt::format_arg_store
:members:
.. doxygenclass:: fmt::basic_format_args
:members:
.. doxygenstruct:: fmt::format_args
.. doxygenclass:: fmt::basic_format_arg
:members:
Compatibility
-------------
.. doxygenclass:: fmt::basic_string_view
:members:
.. doxygentypedef:: fmt::string_view
.. doxygentypedef:: fmt::wstring_view
.. _format-api:
Format API
==========
``fmt/format.h`` defines the full format API providing compile-time format
string checks, output iterator and user-defined type support.
Compile-time Format String Checks
---------------------------------
.. doxygendefine:: FMT_STRING
.. doxygendefine:: fmt
Formatting User-defined Types
-----------------------------
To make a user-defined type formattable, specialize the ``formatter<T>`` struct
template and implement ``parse`` and ``format`` methods::
#include <fmt/format.h>
struct point { double x, y; };
namespace fmt {
template <>
struct formatter<point> {
template <typename ParseContext>
constexpr auto parse(ParseContext &ctx) { return ctx.begin(); }
template <typename FormatContext>
auto format(const point &p, FormatContext &ctx) {
return format_to(ctx.out(), "({:.1f}, {:.1f})", p.x, p.y);
}
};
}
Then you can pass objects of type ``point`` to any formatting function::
point p = {1, 2};
std::string s = fmt::format("{}", p);
// s == "(1.0, 2.0)"
In the example above the ``formatter<point>::parse`` function ignores the
contents of the format string referred to by ``ctx.begin()`` so the object will
always be formatted in the same way. See ``formatter<tm>::parse`` in
:file:`fmt/chrono.h` for an advanced example of how to parse the format string and
customize the formatted output.
You can also reuse existing formatters, for example::
enum class color {red, green, blue};
template <>
struct fmt::formatter<color>: formatter<string_view> {
// parse is inherited from formatter<string_view>.
template <typename FormatContext>
auto format(color c, FormatContext &ctx) {
string_view name = "unknown";
switch (c) {
case color::red: name = "red"; break;
case color::green: name = "green"; break;
case color::blue: name = "blue"; break;
}
return formatter<string_view>::format(name, ctx);
}
};
You can also write a formatter for a hierarchy of classes::
#include <type_traits>
#include <fmt/format.h>
struct A {
virtual ~A() {}
virtual std::string name() const { return "A"; }
};
struct B : A {
virtual std::string name() const { return "B"; }
};
template <typename T>
struct fmt::formatter<T, std::enable_if_t<std::is_base_of<A, T>::value, char>> :
fmt::formatter<std::string> {
template <typename FormatCtx>
auto format(const A& a, FormatCtx& ctx) {
return fmt::formatter<std::string>::format(a.name(), ctx);
}
};
int main() {
B b;
A& a = b;
fmt::print("{}", a); // prints "B"
}
Output Iterator Support
-----------------------
.. doxygenfunction:: fmt::format_to(OutputIt, const S&, Args&&...)
.. doxygenfunction:: fmt::format_to_n(OutputIt, std::size_t, string_view, Args&&...)
.. doxygenstruct:: fmt::format_to_n_result
:members:
Literal-based API
-----------------
The following user-defined literals are defined in ``fmt/format.h``.
.. doxygenfunction:: operator""_format(const char *, std::size_t)
.. doxygenfunction:: operator""_a(const char *, std::size_t)
Utilities
---------
.. doxygenstruct:: fmt::is_char
.. doxygentypedef:: fmt::char_t
.. doxygenfunction:: fmt::formatted_size(string_view, const Args&...)
.. doxygenfunction:: fmt::to_string(const T&)
.. doxygenfunction:: fmt::to_wstring(const T&)
.. doxygenfunction:: fmt::to_string_view(const Char *)
.. doxygenfunction:: fmt::join(const Range&, string_view)
.. doxygenfunction:: fmt::join(It, It, string_view)
.. doxygenclass:: fmt::basic_memory_buffer
:protected-members:
:members:
System Errors
-------------
fmt does not use ``errno`` to communicate errors to the user, but it may call
system functions which set ``errno``. Users should not make any assumptions about
the value of ``errno`` being preserved by library functions.
.. doxygenclass:: fmt::system_error
:members:
.. doxygenfunction:: fmt::format_system_error
.. doxygenclass:: fmt::windows_error
:members:
.. _formatstrings:
Custom Allocators
-----------------
The {fmt} library supports custom dynamic memory allocators.
A custom allocator class can be specified as a template argument to
:class:`fmt::basic_memory_buffer`::
using custom_memory_buffer =
fmt::basic_memory_buffer<char, fmt::inline_buffer_size, custom_allocator>;
It is also possible to write a formatting function that uses a custom
allocator::
using custom_string =
std::basic_string<char, std::char_traits<char>, custom_allocator>;
custom_string vformat(custom_allocator alloc, fmt::string_view format_str,
fmt::format_args args) {
custom_memory_buffer buf(alloc);
fmt::vformat_to(buf, format_str, args);
return custom_string(buf.data(), buf.size(), alloc);
}
template <typename ...Args>
inline custom_string format(custom_allocator alloc,
fmt::string_view format_str,
const Args & ... args) {
return vformat(alloc, format_str, fmt::make_format_args(args...));
}
The allocator will be used for the output container only. If you are using named
arguments, the container that stores pointers to them will be allocated using
the default allocator. Also floating-point formatting falls back on ``sprintf``
which may do allocations.
Custom Formatting of Built-in Types
-----------------------------------
It is possible to change the way arguments are formatted by providing a
custom argument formatter class::
using arg_formatter = fmt::arg_formatter<fmt::buffer_range<char>>;
// A custom argument formatter that formats negative integers as unsigned
// with the ``x`` format specifier.
class custom_arg_formatter : public arg_formatter {
public:
custom_arg_formatter(fmt::format_context& ctx,
fmt::format_parse_context* parse_ctx = nullptr,
fmt::format_specs* spec = nullptr)
: arg_formatter(ctx, parse_ctx, spec) {}
using arg_formatter::operator();
auto operator()(int value) {
if (specs() && specs()->type == 'x')
return (*this)(static_cast<unsigned>(value)); // convert to unsigned and format
return arg_formatter::operator()(value);
}
};
std::string custom_vformat(fmt::string_view format_str, fmt::format_args args) {
fmt::memory_buffer buffer;
// Pass custom argument formatter as a template arg to vformat_to.
fmt::vformat_to<custom_arg_formatter>(buffer, format_str, args);
return fmt::to_string(buffer);
}
template <typename ...Args>
inline std::string custom_format(
fmt::string_view format_str, const Args &... args) {
return custom_vformat(format_str, fmt::make_format_args(args...));
}
std::string s = custom_format("{:x}", -42); // s == "ffffffd6"
.. doxygenclass:: fmt::arg_formatter
:members:
.. _ranges-api:
Ranges and Tuple Formatting
===========================
The library also supports convenient formatting of ranges and tuples::
#include <fmt/ranges.h>
std::tuple<char, int, float> t{'a', 1, 2.0f};
// Prints "('a', 1, 2.0)"
fmt::print("{}", t);
NOTE: currently, the overload of ``fmt::join`` for iterables exists in the main
``format.h`` header, but expect this to change in the future.
Using ``fmt::join``, you can separate tuple elements with a custom separator::
#include <fmt/ranges.h>
std::tuple<int, char> t = {1, 'a'};
// Prints "1, a"
fmt::print("{}", fmt::join(t, ", "));
.. _chrono-api:
Date and Time Formatting
========================
The library supports `strftime
<http://en.cppreference.com/w/cpp/chrono/c/strftime>`_-like date and time
formatting::
#include <fmt/chrono.h>
std::time_t t = std::time(nullptr);
// Prints "The date is 2016-04-29." (with the current date)
fmt::print("The date is {:%Y-%m-%d}.", *std::localtime(&t));
The format string syntax is described in the documentation of
`strftime <http://en.cppreference.com/w/cpp/chrono/c/strftime>`_.
.. _ostream-api:
``std::ostream`` Support
========================
``fmt/ostream.h`` provides ``std::ostream`` support including formatting of
user-defined types that have overloaded ``operator<<``::
#include <fmt/ostream.h>
class date {
int year_, month_, day_;
public:
date(int year, int month, int day): year_(year), month_(month), day_(day) {}
friend std::ostream &operator<<(std::ostream &os, const date &d) {
return os << d.year_ << '-' << d.month_ << '-' << d.day_;
}
};
std::string s = fmt::format("The date is {}", date(2012, 12, 9));
// s == "The date is 2012-12-9"
.. doxygenfunction:: print(std::basic_ostream<Char>&, const S&, Args&&...)
.. _printf-api:
``printf`` Formatting
=====================
The header ``fmt/printf.h`` provides ``printf``-like formatting functionality.
The following functions use `printf format string syntax
<http://pubs.opengroup.org/onlinepubs/009695399/functions/fprintf.html>`_ with
the POSIX extension for positional arguments. Unlike their standard
counterparts, the ``fmt`` functions are type-safe and throw an exception if an
argument type doesn't match its format specification.
.. doxygenfunction:: printf(const S&, const Args&...)
.. doxygenfunction:: fprintf(std::FILE *, const S&, const Args&...)
.. doxygenfunction:: fprintf(std::basic_ostream<Char>&, const S&, const Args&...)
.. doxygenfunction:: sprintf(const S&, const Args&...)

View File

@ -0,0 +1,2 @@
Sphinx basic theme with Bootstrap support. Modifications are kept to
a minimum to simplify integration in case of changes to Sphinx theming.

View File

@ -0,0 +1,206 @@
{#
basic/layout.html
~~~~~~~~~~~~~~~~~
Master layout template for Sphinx themes.
:copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
#}
{%- block doctype -%}
<!DOCTYPE html>
{%- endblock %}
{%- set reldelim1 = reldelim1 is not defined and ' &raquo;' or reldelim1 %}
{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %}
{%- set render_sidebar = (not embedded) and (not theme_nosidebar|tobool) and
(sidebars != []) %}
{%- set url_root = pathto('', 1) %}
{# XXX necessary? #}
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
{%- if not embedded and docstitle %}
{%- set titlesuffix = " &mdash; "|safe + docstitle|e %}
{%- else %}
{%- set titlesuffix = "" %}
{%- endif %}
{%- macro relbar() %}
<div class="related" role="navigation" aria-label="related navigation">
<h3>{{ _('Navigation') }}</h3>
<ul>
{%- for rellink in rellinks %}
<li class="right" {% if loop.first %}style="margin-right: 10px"{% endif %}>
<a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags|e }}"
{{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a>
{%- if not loop.first %}{{ reldelim2 }}{% endif %}</li>
{%- endfor %}
{%- block rootrellink %}
<li class="nav-item nav-item-0"><a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>{{ reldelim1 }}</li>
{%- endblock %}
{%- for parent in parents %}
<li class="nav-item nav-item-{{ loop.index }}"><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li>
{%- endfor %}
{%- block relbaritems %} {% endblock %}
</ul>
</div>
{%- endmacro %}
{%- macro sidebar() %}
{%- if render_sidebar %}
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
{%- block sidebarlogo %}
{%- if logo %}
<p class="logo"><a href="{{ pathto(master_doc) }}">
<img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/>
</a></p>
{%- endif %}
{%- endblock %}
{%- if sidebars != None %}
{#- new style sidebar: explicitly include/exclude templates #}
{%- for sidebartemplate in sidebars %}
{%- include sidebartemplate %}
{%- endfor %}
{%- else %}
{#- old style sidebars: using blocks -- should be deprecated #}
{%- block sidebartoc %}
{%- include "localtoc.html" %}
{%- endblock %}
{%- block sidebarrel %}
{%- include "relations.html" %}
{%- endblock %}
{%- block sidebarsourcelink %}
{%- include "sourcelink.html" %}
{%- endblock %}
{%- if customsidebar %}
{%- include customsidebar %}
{%- endif %}
{%- block sidebarsearch %}
{%- include "searchbox.html" %}
{%- endblock %}
{%- endif %}
</div>
</div>
{%- endif %}
{%- endmacro %}
{%- macro script() %}
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '{{ url_root }}',
VERSION: '{{ release|e }}',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '{{ '' if no_search_suffix else file_suffix }}',
HAS_SOURCE: {{ has_source|lower }},
SOURCELINK_SUFFIX: '{{ sourcelink_suffix }}'
};
</script>
{%- for scriptfile in script_files %}
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
{%- endfor %}
{%- endmacro %}
{%- macro css() %}
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
{%- for cssfile in css_files %}
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
{%- endfor %}
{%- endmacro %}
<html lang="en">
<head>
<meta charset="{{ encoding }}">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{# The above 3 meta tags *must* come first in the head; any other head content
must come *after* these tags. #}
{{ metatags }}
{%- block htmltitle %}
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
{%- endblock %}
{{ css() }}
{%- if not embedded %}
{{ script() }}
{%- if use_opensearch %}
<link rel="search" type="application/opensearchdescription+xml"
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
href="{{ pathto('_static/opensearch.xml', 1) }}"/>
{%- endif %}
{%- if favicon %}
<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
{%- endif %}
{%- endif %}
{%- block linktags %}
{%- if hasdoc('about') %}
<link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
{%- endif %}
{%- if hasdoc('genindex') %}
<link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
{%- endif %}
{%- if hasdoc('search') %}
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
{%- endif %}
{%- if hasdoc('copyright') %}
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
{%- endif %}
{%- if parents %}
<link rel="up" title="{{ parents[-1].title|striptags|e }}" href="{{ parents[-1].link|e }}" />
{%- endif %}
{%- if next %}
<link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
{%- endif %}
{%- if prev %}
<link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
{%- endif %}
{%- endblock %}
{%- block extrahead %} {% endblock %}
</head>
<body role="document">
{%- block header %}{% endblock %}
{%- block relbar1 %}{{ relbar() }}{% endblock %}
{%- block content %}
{%- block sidebar1 %} {# possible location for sidebar #} {% endblock %}
<div class="document">
{%- block document %}
<div class="documentwrapper">
{%- if render_sidebar %}
<div class="bodywrapper">
{%- endif %}
<div class="body" role="main">
{% block body %} {% endblock %}
</div>
{%- if render_sidebar %}
</div>
{%- endif %}
</div>
{%- endblock %}
{%- block sidebar2 %}{{ sidebar() }}{% endblock %}
<div class="clearer"></div>
</div>
{%- endblock %}
{%- block relbar2 %}{{ relbar() }}{% endblock %}
{%- block footer %}
<div class="footer" role="contentinfo">
{%- if show_copyright %}
{%- if hasdoc('copyright') %}
{% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
{%- else %}
{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
{%- endif %}
{%- endif %}
{%- if last_updated %}
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
{%- endif %}
{%- if show_sphinx %}
{% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
{%- endif %}
</div>
{%- endblock %}
</body>
</html>

View File

@ -0,0 +1,2 @@
[theme]
inherit = basic

73
doc/bootstrap/alerts.less Normal file
View File

@ -0,0 +1,73 @@
//
// Alerts
// --------------------------------------------------
// Base styles
// -------------------------
.alert {
padding: @alert-padding;
margin-bottom: @line-height-computed;
border: 1px solid transparent;
border-radius: @alert-border-radius;
// Headings for larger alerts
h4 {
margin-top: 0;
// Specified for the h4 to prevent conflicts of changing @headings-color
color: inherit;
}
// Provide class for links that match alerts
.alert-link {
font-weight: @alert-link-font-weight;
}
// Improve alignment and spacing of inner content
> p,
> ul {
margin-bottom: 0;
}
> p + p {
margin-top: 5px;
}
}
// Dismissible alerts
//
// Expand the right padding and account for the close button's positioning.
.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.
.alert-dismissible {
padding-right: (@alert-padding + 20);
// Adjust close link position
.close {
position: relative;
top: -2px;
right: -21px;
color: inherit;
}
}
// Alternate styles
//
// Generate contextual modifier classes for colorizing the alert.
.alert-success {
.alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);
}
.alert-info {
.alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);
}
.alert-warning {
.alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);
}
.alert-danger {
.alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);
}

66
doc/bootstrap/badges.less Normal file
View File

@ -0,0 +1,66 @@
//
// Badges
// --------------------------------------------------
// Base class
.badge {
display: inline-block;
min-width: 10px;
padding: 3px 7px;
font-size: @font-size-small;
font-weight: @badge-font-weight;
color: @badge-color;
line-height: @badge-line-height;
vertical-align: baseline;
white-space: nowrap;
text-align: center;
background-color: @badge-bg;
border-radius: @badge-border-radius;
// Empty badges collapse automatically (not available in IE8)
&:empty {
display: none;
}
// Quick fix for badges in buttons
.btn & {
position: relative;
top: -1px;
}
.btn-xs &,
.btn-group-xs > .btn & {
top: 0;
padding: 1px 5px;
}
// Hover state, but only for links
a& {
&:hover,
&:focus {
color: @badge-link-hover-color;
text-decoration: none;
cursor: pointer;
}
}
// Account for badges in navs
.list-group-item.active > &,
.nav-pills > .active > a > & {
color: @badge-active-color;
background-color: @badge-active-bg;
}
.list-group-item > & {
float: right;
}
.list-group-item > & + & {
margin-right: 5px;
}
.nav-pills > li > a > & {
margin-left: 3px;
}
}

50
doc/bootstrap/bootstrap.less vendored Normal file
View File

@ -0,0 +1,50 @@
// Core variables and mixins
@import "variables.less";
@import "mixins.less";
// Reset and dependencies
@import "normalize.less";
@import "print.less";
@import "glyphicons.less";
// Core CSS
@import "scaffolding.less";
@import "type.less";
@import "code.less";
@import "grid.less";
@import "tables.less";
@import "forms.less";
@import "buttons.less";
// Components
@import "component-animations.less";
@import "dropdowns.less";
@import "button-groups.less";
@import "input-groups.less";
@import "navs.less";
@import "navbar.less";
@import "breadcrumbs.less";
@import "pagination.less";
@import "pager.less";
@import "labels.less";
@import "badges.less";
@import "jumbotron.less";
@import "thumbnails.less";
@import "alerts.less";
@import "progress-bars.less";
@import "media.less";
@import "list-group.less";
@import "panels.less";
@import "responsive-embed.less";
@import "wells.less";
@import "close.less";
// Components w/ JavaScript
@import "modals.less";
@import "tooltip.less";
@import "popovers.less";
@import "carousel.less";
// Utility classes
@import "utilities.less";
@import "responsive-utilities.less";

View File

@ -0,0 +1,26 @@
//
// Breadcrumbs
// --------------------------------------------------
.breadcrumb {
padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;
margin-bottom: @line-height-computed;
list-style: none;
background-color: @breadcrumb-bg;
border-radius: @border-radius-base;
> li {
display: inline-block;
+ li:before {
content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space
padding: 0 5px;
color: @breadcrumb-color;
}
}
> .active {
color: @breadcrumb-active-color;
}
}

View File

@ -0,0 +1,243 @@
//
// Button groups
// --------------------------------------------------
// Make the div behave like a button
.btn-group,
.btn-group-vertical {
position: relative;
display: inline-block;
vertical-align: middle; // match .btn alignment given font-size hack above
> .btn {
position: relative;
float: left;
// Bring the "active" button to the front
&:hover,
&:focus,
&:active,
&.active {
z-index: 2;
}
}
}
// Prevent double borders when buttons are next to each other
.btn-group {
.btn + .btn,
.btn + .btn-group,
.btn-group + .btn,
.btn-group + .btn-group {
margin-left: -1px;
}
}
// Optional: Group multiple button groups together for a toolbar
.btn-toolbar {
margin-left: -5px; // Offset the first child's margin
&:extend(.clearfix all);
.btn-group,
.input-group {
float: left;
}
> .btn,
> .btn-group,
> .input-group {
margin-left: 5px;
}
}
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
border-radius: 0;
}
// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
.btn-group > .btn:first-child {
margin-left: 0;
&:not(:last-child):not(.dropdown-toggle) {
.border-right-radius(0);
}
}
// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
.btn-group > .btn:last-child:not(:first-child),
.btn-group > .dropdown-toggle:not(:first-child) {
.border-left-radius(0);
}
// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)
.btn-group > .btn-group {
float: left;
}
.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}
.btn-group > .btn-group:first-child:not(:last-child) {
> .btn:last-child,
> .dropdown-toggle {
.border-right-radius(0);
}
}
.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
.border-left-radius(0);
}
// On active and open, don't show outline
.btn-group .dropdown-toggle:active,
.btn-group.open .dropdown-toggle {
outline: 0;
}
// Sizing
//
// Remix the default button sizing classes into new ones for easier manipulation.
.btn-group-xs > .btn { &:extend(.btn-xs); }
.btn-group-sm > .btn { &:extend(.btn-sm); }
.btn-group-lg > .btn { &:extend(.btn-lg); }
// Split button dropdowns
// ----------------------
// Give the line between buttons some depth
.btn-group > .btn + .dropdown-toggle {
padding-left: 8px;
padding-right: 8px;
}
.btn-group > .btn-lg + .dropdown-toggle {
padding-left: 12px;
padding-right: 12px;
}
// The clickable button for toggling the menu
// Remove the gradient and set the same inset shadow as the :active state
.btn-group.open .dropdown-toggle {
.box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
// Show no shadow for `.btn-link` since it has no other button styles.
&.btn-link {
.box-shadow(none);
}
}
// Reposition the caret
.btn .caret {
margin-left: 0;
}
// Carets in other button sizes
.btn-lg .caret {
border-width: @caret-width-large @caret-width-large 0;
border-bottom-width: 0;
}
// Upside down carets for .dropup
.dropup .btn-lg .caret {
border-width: 0 @caret-width-large @caret-width-large;
}
// Vertical button groups
// ----------------------
.btn-group-vertical {
> .btn,
> .btn-group,
> .btn-group > .btn {
display: block;
float: none;
width: 100%;
max-width: 100%;
}
// Clear floats so dropdown menus can be properly placed
> .btn-group {
&:extend(.clearfix all);
> .btn {
float: none;
}
}
> .btn + .btn,
> .btn + .btn-group,
> .btn-group + .btn,
> .btn-group + .btn-group {
margin-top: -1px;
margin-left: 0;
}
}
.btn-group-vertical > .btn {
&:not(:first-child):not(:last-child) {
border-radius: 0;
}
&:first-child:not(:last-child) {
border-top-right-radius: @border-radius-base;
.border-bottom-radius(0);
}
&:last-child:not(:first-child) {
border-bottom-left-radius: @border-radius-base;
.border-top-radius(0);
}
}
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}
.btn-group-vertical > .btn-group:first-child:not(:last-child) {
> .btn:last-child,
> .dropdown-toggle {
.border-bottom-radius(0);
}
}
.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
.border-top-radius(0);
}
// Justified button groups
// ----------------------
.btn-group-justified {
display: table;
width: 100%;
table-layout: fixed;
border-collapse: separate;
> .btn,
> .btn-group {
float: none;
display: table-cell;
width: 1%;
}
> .btn-group .btn {
width: 100%;
}
> .btn-group .dropdown-menu {
left: auto;
}
}
// Checkbox and radio options
//
// In order to support the browser's form validation feedback, powered by the
// `required` attribute, we have to "hide" the inputs via `clip`. We cannot use
// `display: none;` or `visibility: hidden;` as that also hides the popover.
// Simply visually hiding the inputs via `opacity` would leave them clickable in
// certain cases which is prevented by using `clip` and `pointer-events`.
// This way, we ensure a DOM element is visible to position the popover from.
//
// See https://github.com/twbs/bootstrap/pull/12794 and
// https://github.com/twbs/bootstrap/pull/14559 for more information.
[data-toggle="buttons"] {
> .btn,
> .btn-group > .btn {
input[type="radio"],
input[type="checkbox"] {
position: absolute;
clip: rect(0,0,0,0);
pointer-events: none;
}
}
}

160
doc/bootstrap/buttons.less Normal file
View File

@ -0,0 +1,160 @@
//
// Buttons
// --------------------------------------------------
// Base styles
// --------------------------------------------------
.btn {
display: inline-block;
margin-bottom: 0; // For input.btn
font-weight: @btn-font-weight;
text-align: center;
vertical-align: middle;
touch-action: manipulation;
cursor: pointer;
background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
border: 1px solid transparent;
white-space: nowrap;
.button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @border-radius-base);
.user-select(none);
&,
&:active,
&.active {
&:focus,
&.focus {
.tab-focus();
}
}
&:hover,
&:focus,
&.focus {
color: @btn-default-color;
text-decoration: none;
}
&:active,
&.active {
outline: 0;
background-image: none;
.box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
}
&.disabled,
&[disabled],
fieldset[disabled] & {
cursor: @cursor-disabled;
pointer-events: none; // Future-proof disabling of clicks
.opacity(.65);
.box-shadow(none);
}
}
// Alternate buttons
// --------------------------------------------------
.btn-default {
.button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);
}
.btn-primary {
.button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);
}
// Success appears as green
.btn-success {
.button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);
}
// Info appears as blue-green
.btn-info {
.button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);
}
// Warning appears as orange
.btn-warning {
.button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);
}
// Danger and error appear as red
.btn-danger {
.button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);
}
// Link buttons
// -------------------------
// Make a button look and behave like a link
.btn-link {
color: @link-color;
font-weight: normal;
border-radius: 0;
&,
&:active,
&.active,
&[disabled],
fieldset[disabled] & {
background-color: transparent;
.box-shadow(none);
}
&,
&:hover,
&:focus,
&:active {
border-color: transparent;
}
&:hover,
&:focus {
color: @link-hover-color;
text-decoration: @link-hover-decoration;
background-color: transparent;
}
&[disabled],
fieldset[disabled] & {
&:hover,
&:focus {
color: @btn-link-disabled-color;
text-decoration: none;
}
}
}
// Button Sizes
// --------------------------------------------------
.btn-lg {
// line-height: ensure even-numbered height of button next to large input
.button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);
}
.btn-sm {
// line-height: ensure proper height of button next to small input
.button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
}
.btn-xs {
.button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @border-radius-small);
}
// Block button
// --------------------------------------------------
.btn-block {
display: block;
width: 100%;
}
// Vertically space out multiple block buttons
.btn-block + .btn-block {
margin-top: 5px;
}
// Specificity overrides
input[type="submit"],
input[type="reset"],
input[type="button"] {
&.btn-block {
width: 100%;
}
}

269
doc/bootstrap/carousel.less Normal file
View File

@ -0,0 +1,269 @@
//
// Carousel
// --------------------------------------------------
// Wrapper for the slide container and indicators
.carousel {
position: relative;
}
.carousel-inner {
position: relative;
overflow: hidden;
width: 100%;
> .item {
display: none;
position: relative;
.transition(.6s ease-in-out left);
// Account for jankitude on images
> img,
> a > img {
&:extend(.img-responsive);
line-height: 1;
}
// WebKit CSS3 transforms for supported devices
@media all and (transform-3d), (-webkit-transform-3d) {
.transition-transform(~'0.6s ease-in-out');
.backface-visibility(~'hidden');
.perspective(1000);
&.next,
&.active.right {
.translate3d(100%, 0, 0);
left: 0;
}
&.prev,
&.active.left {
.translate3d(-100%, 0, 0);
left: 0;
}
&.next.left,
&.prev.right,
&.active {
.translate3d(0, 0, 0);
left: 0;
}
}
}
> .active,
> .next,
> .prev {
display: block;
}
> .active {
left: 0;
}
> .next,
> .prev {
position: absolute;
top: 0;
width: 100%;
}
> .next {
left: 100%;
}
> .prev {
left: -100%;
}
> .next.left,
> .prev.right {
left: 0;
}
> .active.left {
left: -100%;
}
> .active.right {
left: 100%;
}
}
// Left/right controls for nav
// ---------------------------
.carousel-control {
position: absolute;
top: 0;
left: 0;
bottom: 0;
width: @carousel-control-width;
.opacity(@carousel-control-opacity);
font-size: @carousel-control-font-size;
color: @carousel-control-color;
text-align: center;
text-shadow: @carousel-text-shadow;
// We can't have this transition here because WebKit cancels the carousel
// animation if you trip this while in the middle of another animation.
// Set gradients for backgrounds
&.left {
#gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));
}
&.right {
left: auto;
right: 0;
#gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));
}
// Hover/focus state
&:hover,
&:focus {
outline: 0;
color: @carousel-control-color;
text-decoration: none;
.opacity(.9);
}
// Toggles
.icon-prev,
.icon-next,
.glyphicon-chevron-left,
.glyphicon-chevron-right {
position: absolute;
top: 50%;
z-index: 5;
display: inline-block;
}
.icon-prev,
.glyphicon-chevron-left {
left: 50%;
margin-left: -10px;
}
.icon-next,
.glyphicon-chevron-right {
right: 50%;
margin-right: -10px;
}
.icon-prev,
.icon-next {
width: 20px;
height: 20px;
margin-top: -10px;
line-height: 1;
font-family: serif;
}
.icon-prev {
&:before {
content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)
}
}
.icon-next {
&:before {
content: '\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)
}
}
}
// Optional indicator pips
//
// Add an unordered list with the following class and add a list item for each
// slide your carousel holds.
.carousel-indicators {
position: absolute;
bottom: 10px;
left: 50%;
z-index: 15;
width: 60%;
margin-left: -30%;
padding-left: 0;
list-style: none;
text-align: center;
li {
display: inline-block;
width: 10px;
height: 10px;
margin: 1px;
text-indent: -999px;
border: 1px solid @carousel-indicator-border-color;
border-radius: 10px;
cursor: pointer;
// IE8-9 hack for event handling
//
// Internet Explorer 8-9 does not support clicks on elements without a set
// `background-color`. We cannot use `filter` since that's not viewed as a
// background color by the browser. Thus, a hack is needed.
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer
//
// For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we
// set alpha transparency for the best results possible.
background-color: #000 \9; // IE8
background-color: rgba(0,0,0,0); // IE9
}
.active {
margin: 0;
width: 12px;
height: 12px;
background-color: @carousel-indicator-active-bg;
}
}
// Optional captions
// -----------------------------
// Hidden by default for smaller viewports
.carousel-caption {
position: absolute;
left: 15%;
right: 15%;
bottom: 20px;
z-index: 10;
padding-top: 20px;
padding-bottom: 20px;
color: @carousel-caption-color;
text-align: center;
text-shadow: @carousel-text-shadow;
& .btn {
text-shadow: none; // No shadow for button elements in carousel-caption
}
}
// Scale up controls for tablets and up
@media screen and (min-width: @screen-sm-min) {
// Scale up the controls a smidge
.carousel-control {
.glyphicon-chevron-left,
.glyphicon-chevron-right,
.icon-prev,
.icon-next {
width: 30px;
height: 30px;
margin-top: -15px;
font-size: 30px;
}
.glyphicon-chevron-left,
.icon-prev {
margin-left: -15px;
}
.glyphicon-chevron-right,
.icon-next {
margin-right: -15px;
}
}
// Show and left align the captions
.carousel-caption {
left: 20%;
right: 20%;
padding-bottom: 30px;
}
// Move up the indicators
.carousel-indicators {
bottom: 20px;
}
}

34
doc/bootstrap/close.less Normal file
View File

@ -0,0 +1,34 @@
//
// Close icons
// --------------------------------------------------
.close {
float: right;
font-size: (@font-size-base * 1.5);
font-weight: @close-font-weight;
line-height: 1;
color: @close-color;
text-shadow: @close-text-shadow;
.opacity(.2);
&:hover,
&:focus {
color: @close-color;
text-decoration: none;
cursor: pointer;
.opacity(.5);
}
// Additional properties for button version
// iOS requires the button element instead of an anchor tag.
// If you want the anchor version, it requires `href="#"`.
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
button& {
padding: 0;
cursor: pointer;
background: transparent;
border: 0;
-webkit-appearance: none;
}
}

69
doc/bootstrap/code.less Normal file
View File

@ -0,0 +1,69 @@
//
// Code (inline and block)
// --------------------------------------------------
// Inline and block code styles
code,
kbd,
pre,
samp {
font-family: @font-family-monospace;
}
// Inline code
code {
padding: 2px 4px;
font-size: 90%;
color: @code-color;
background-color: @code-bg;
border-radius: @border-radius-base;
}
// User input typically entered via keyboard
kbd {
padding: 2px 4px;
font-size: 90%;
color: @kbd-color;
background-color: @kbd-bg;
border-radius: @border-radius-small;
box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);
kbd {
padding: 0;
font-size: 100%;
font-weight: bold;
box-shadow: none;
}
}
// Blocks of code
pre {
display: block;
padding: ((@line-height-computed - 1) / 2);
margin: 0 0 (@line-height-computed / 2);
font-size: (@font-size-base - 1); // 14px to 13px
line-height: @line-height-base;
word-break: break-all;
word-wrap: break-word;
color: @pre-color;
background-color: @pre-bg;
border: 1px solid @pre-border-color;
border-radius: @border-radius-base;
// Account for some code outputs that place code tags in pre tags
code {
padding: 0;
font-size: inherit;
color: inherit;
white-space: pre-wrap;
background-color: transparent;
border-radius: 0;
}
}
// Enable scrollable blocks of code
.pre-scrollable {
max-height: @pre-scrollable-max-height;
overflow-y: scroll;
}

View File

@ -0,0 +1,33 @@
//
// Component animations
// --------------------------------------------------
// Heads up!
//
// We don't use the `.opacity()` mixin here since it causes a bug with text
// fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.
.fade {
opacity: 0;
.transition(opacity .15s linear);
&.in {
opacity: 1;
}
}
.collapse {
display: none;
&.in { display: block; }
tr&.in { display: table-row; }
tbody&.in { display: table-row-group; }
}
.collapsing {
position: relative;
height: 0;
overflow: hidden;
.transition-property(~"height, visibility");
.transition-duration(.35s);
.transition-timing-function(ease);
}

View File

@ -0,0 +1,214 @@
//
// Dropdown menus
// --------------------------------------------------
// Dropdown arrow/caret
.caret {
display: inline-block;
width: 0;
height: 0;
margin-left: 2px;
vertical-align: middle;
border-top: @caret-width-base dashed;
border-right: @caret-width-base solid transparent;
border-left: @caret-width-base solid transparent;
}
// The dropdown wrapper (div)
.dropup,
.dropdown {
position: relative;
}
// Prevent the focus on the dropdown toggle when closing dropdowns
.dropdown-toggle:focus {
outline: 0;
}
// The dropdown menu (ul)
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: @zindex-dropdown;
display: none; // none by default, but block on "open" of the menu
float: left;
min-width: 160px;
padding: 5px 0;
margin: 2px 0 0; // override default ul
list-style: none;
font-size: @font-size-base;
text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
background-color: @dropdown-bg;
border: 1px solid @dropdown-fallback-border; // IE8 fallback
border: 1px solid @dropdown-border;
border-radius: @border-radius-base;
.box-shadow(0 6px 12px rgba(0,0,0,.175));
background-clip: padding-box;
// Aligns the dropdown menu to right
//
// Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`
&.pull-right {
right: 0;
left: auto;
}
// Dividers (basically an hr) within the dropdown
.divider {
.nav-divider(@dropdown-divider-bg);
}
// Links within the dropdown menu
> li > a {
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: @line-height-base;
color: @dropdown-link-color;
white-space: nowrap; // prevent links from randomly breaking onto new lines
}
}
// Hover/Focus state
.dropdown-menu > li > a {
&:hover,
&:focus {
text-decoration: none;
color: @dropdown-link-hover-color;
background-color: @dropdown-link-hover-bg;
}
}
// Active state
.dropdown-menu > .active > a {
&,
&:hover,
&:focus {
color: @dropdown-link-active-color;
text-decoration: none;
outline: 0;
background-color: @dropdown-link-active-bg;
}
}
// Disabled state
//
// Gray out text and ensure the hover/focus state remains gray
.dropdown-menu > .disabled > a {
&,
&:hover,
&:focus {
color: @dropdown-link-disabled-color;
}
// Nuke hover/focus effects
&:hover,
&:focus {
text-decoration: none;
background-color: transparent;
background-image: none; // Remove CSS gradient
.reset-filter();
cursor: @cursor-disabled;
}
}
// Open state for the dropdown
.open {
// Show the menu
> .dropdown-menu {
display: block;
}
// Remove the outline when :focus is triggered
> a {
outline: 0;
}
}
// Menu positioning
//
// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
// menu with the parent.
.dropdown-menu-right {
left: auto; // Reset the default from `.dropdown-menu`
right: 0;
}
// With v3, we enabled auto-flipping if you have a dropdown within a right
// aligned nav component. To enable the undoing of that, we provide an override
// to restore the default dropdown menu alignment.
//
// This is only for left-aligning a dropdown menu within a `.navbar-right` or
// `.pull-right` nav component.
.dropdown-menu-left {
left: 0;
right: auto;
}
// Dropdown section headers
.dropdown-header {
display: block;
padding: 3px 20px;
font-size: @font-size-small;
line-height: @line-height-base;
color: @dropdown-header-color;
white-space: nowrap; // as with > li > a
}
// Backdrop to catch body clicks on mobile, etc.
.dropdown-backdrop {
position: fixed;
left: 0;
right: 0;
bottom: 0;
top: 0;
z-index: (@zindex-dropdown - 10);
}
// Right aligned dropdowns
.pull-right > .dropdown-menu {
right: 0;
left: auto;
}
// Allow for dropdowns to go bottom up (aka, dropup-menu)
//
// Just add .dropup after the standard .dropdown class and you're set, bro.
// TODO: abstract this so that the navbar fixed styles are not placed here?
.dropup,
.navbar-fixed-bottom .dropdown {
// Reverse the caret
.caret {
border-top: 0;
border-bottom: @caret-width-base solid;
content: "";
}
// Different positioning for bottom up menu
.dropdown-menu {
top: auto;
bottom: 100%;
margin-bottom: 2px;
}
}
// Component alignment
//
// Reiterate per navbar.less and the modified component alignment there.
@media (min-width: @grid-float-breakpoint) {
.navbar-right {
.dropdown-menu {
.dropdown-menu-right();
}
// Necessary for overrides of the default right aligned menu.
// Will remove come v4 in all likelihood.
.dropdown-menu-left {
.dropdown-menu-left();
}
}
}

574
doc/bootstrap/forms.less Normal file
View File

@ -0,0 +1,574 @@
//
// Forms
// --------------------------------------------------
// Normalize non-controls
//
// Restyle and baseline non-control form elements.
fieldset {
padding: 0;
margin: 0;
border: 0;
// Chrome and Firefox set a `min-width: min-content;` on fieldsets,
// so we reset that to ensure it behaves more like a standard block element.
// See https://github.com/twbs/bootstrap/issues/12359.
min-width: 0;
}
legend {
display: block;
width: 100%;
padding: 0;
margin-bottom: @line-height-computed;
font-size: (@font-size-base * 1.5);
line-height: inherit;
color: @legend-color;
border: 0;
border-bottom: 1px solid @legend-border-color;
}
label {
display: inline-block;
max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)
margin-bottom: 5px;
font-weight: bold;
}
// Normalize form controls
//
// While most of our form styles require extra classes, some basic normalization
// is required to ensure optimum display with or without those classes to better
// address browser inconsistencies.
// Override content-box in Normalize (* isn't specific enough)
input[type="search"] {
.box-sizing(border-box);
}
// Position radios and checkboxes better
input[type="radio"],
input[type="checkbox"] {
margin: 4px 0 0;
margin-top: 1px \9; // IE8-9
line-height: normal;
}
// Set the height of file controls to match text inputs
input[type="file"] {
display: block;
}
// Make range inputs behave like textual form controls
input[type="range"] {
display: block;
width: 100%;
}
// Make multiple select elements height not fixed
select[multiple],
select[size] {
height: auto;
}
// Focus for file, radio, and checkbox
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus {
.tab-focus();
}
// Adjust output element
output {
display: block;
padding-top: (@padding-base-vertical + 1);
font-size: @font-size-base;
line-height: @line-height-base;
color: @input-color;
}
// Common form controls
//
// Shared size and type resets for form controls. Apply `.form-control` to any
// of the following form controls:
//
// select
// textarea
// input[type="text"]
// input[type="password"]
// input[type="datetime"]
// input[type="datetime-local"]
// input[type="date"]
// input[type="month"]
// input[type="time"]
// input[type="week"]
// input[type="number"]
// input[type="email"]
// input[type="url"]
// input[type="search"]
// input[type="tel"]
// input[type="color"]
.form-control {
display: block;
width: 100%;
height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
padding: @padding-base-vertical @padding-base-horizontal;
font-size: @font-size-base;
line-height: @line-height-base;
color: @input-color;
background-color: @input-bg;
background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
border: 1px solid @input-border;
border-radius: @input-border-radius; // Note: This has no effect on <select>s in some browsers, due to the limited stylability of <select>s in CSS.
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
.transition(~"border-color ease-in-out .15s, box-shadow ease-in-out .15s");
// Customize the `:focus` state to imitate native WebKit styles.
.form-control-focus();
// Placeholder
.placeholder();
// Disabled and read-only inputs
//
// HTML5 says that controls under a fieldset > legend:first-child won't be
// disabled if the fieldset is disabled. Due to implementation difficulty, we
// don't honor that edge case; we style them as disabled anyway.
&[disabled],
&[readonly],
fieldset[disabled] & {
background-color: @input-bg-disabled;
opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655
}
&[disabled],
fieldset[disabled] & {
cursor: @cursor-disabled;
}
// Reset height for `textarea`s
textarea& {
height: auto;
}
}
// Search inputs in iOS
//
// This overrides the extra rounded corners on search inputs in iOS so that our
// `.form-control` class can properly style them. Note that this cannot simply
// be added to `.form-control` as it's not specific enough. For details, see
// https://github.com/twbs/bootstrap/issues/11586.
input[type="search"] {
-webkit-appearance: none;
}
// Special styles for iOS temporal inputs
//
// In Mobile Safari, setting `display: block` on temporal inputs causes the
// text within the input to become vertically misaligned. As a workaround, we
// set a pixel line-height that matches the given height of the input, but only
// for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848
@media screen and (-webkit-min-device-pixel-ratio: 0) {
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
line-height: @input-height-base;
&.input-sm,
.input-group-sm & {
line-height: @input-height-small;
}
&.input-lg,
.input-group-lg & {
line-height: @input-height-large;
}
}
}
// Form groups
//
// Designed to help with the organization and spacing of vertical forms. For
// horizontal forms, use the predefined grid classes.
.form-group {
margin-bottom: @form-group-margin-bottom;
}
// Checkboxes and radios
//
// Indent the labels to position radios/checkboxes as hanging controls.
.radio,
.checkbox {
position: relative;
display: block;
margin-top: 10px;
margin-bottom: 10px;
label {
min-height: @line-height-computed; // Ensure the input doesn't jump when there is no text
padding-left: 20px;
margin-bottom: 0;
font-weight: normal;
cursor: pointer;
}
}
.radio input[type="radio"],
.radio-inline input[type="radio"],
.checkbox input[type="checkbox"],
.checkbox-inline input[type="checkbox"] {
position: absolute;
margin-left: -20px;
margin-top: 4px \9;
}
.radio + .radio,
.checkbox + .checkbox {
margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing
}
// Radios and checkboxes on same line
.radio-inline,
.checkbox-inline {
position: relative;
display: inline-block;
padding-left: 20px;
margin-bottom: 0;
vertical-align: middle;
font-weight: normal;
cursor: pointer;
}
.radio-inline + .radio-inline,
.checkbox-inline + .checkbox-inline {
margin-top: 0;
margin-left: 10px; // space out consecutive inline controls
}
// Apply same disabled cursor tweak as for inputs
// Some special care is needed because <label>s don't inherit their parent's `cursor`.
//
// Note: Neither radios nor checkboxes can be readonly.
input[type="radio"],
input[type="checkbox"] {
&[disabled],
&.disabled,
fieldset[disabled] & {
cursor: @cursor-disabled;
}
}
// These classes are used directly on <label>s
.radio-inline,
.checkbox-inline {
&.disabled,
fieldset[disabled] & {
cursor: @cursor-disabled;
}
}
// These classes are used on elements with <label> descendants
.radio,
.checkbox {
&.disabled,
fieldset[disabled] & {
label {
cursor: @cursor-disabled;
}
}
}
// Static form control text
//
// Apply class to a `p` element to make any string of text align with labels in
// a horizontal form layout.
.form-control-static {
// Size it appropriately next to real form controls
padding-top: (@padding-base-vertical + 1);
padding-bottom: (@padding-base-vertical + 1);
// Remove default margin from `p`
margin-bottom: 0;
min-height: (@line-height-computed + @font-size-base);
&.input-lg,
&.input-sm {
padding-left: 0;
padding-right: 0;
}
}
// Form control sizing
//
// Build on `.form-control` with modifier classes to decrease or increase the
// height and font-size of form controls.
//
// The `.form-group-* form-control` variations are sadly duplicated to avoid the
// issue documented in https://github.com/twbs/bootstrap/issues/15074.
.input-sm {
.input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @input-border-radius-small);
}
.form-group-sm {
.form-control {
.input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @input-border-radius-small);
}
.form-control-static {
height: @input-height-small;
padding: @padding-small-vertical @padding-small-horizontal;
font-size: @font-size-small;
line-height: @line-height-small;
min-height: (@line-height-computed + @font-size-small);
}
}
.input-lg {
.input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @input-border-radius-large);
}
.form-group-lg {
.form-control {
.input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @input-border-radius-large);
}
.form-control-static {
height: @input-height-large;
padding: @padding-large-vertical @padding-large-horizontal;
font-size: @font-size-large;
line-height: @line-height-large;
min-height: (@line-height-computed + @font-size-large);
}
}
// Form control feedback states
//
// Apply contextual and semantic states to individual form controls.
.has-feedback {
// Enable absolute positioning
position: relative;
// Ensure icons don't overlap text
.form-control {
padding-right: (@input-height-base * 1.25);
}
}
// Feedback icon (requires .glyphicon classes)
.form-control-feedback {
position: absolute;
top: 0;
right: 0;
z-index: 2; // Ensure icon is above input groups
display: block;
width: @input-height-base;
height: @input-height-base;
line-height: @input-height-base;
text-align: center;
pointer-events: none;
}
.input-lg + .form-control-feedback {
width: @input-height-large;
height: @input-height-large;
line-height: @input-height-large;
}
.input-sm + .form-control-feedback {
width: @input-height-small;
height: @input-height-small;
line-height: @input-height-small;
}
// Feedback states
.has-success {
.form-control-validation(@state-success-text; @state-success-text; @state-success-bg);
}
.has-warning {
.form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg);
}
.has-error {
.form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg);
}
// Reposition feedback icon if input has visible label above
.has-feedback label {
& ~ .form-control-feedback {
top: (@line-height-computed + 5); // Height of the `label` and its margin
}
&.sr-only ~ .form-control-feedback {
top: 0;
}
}
// Help text
//
// Apply to any element you wish to create light text for placement immediately
// below a form control. Use for general help, formatting, or instructional text.
.help-block {
display: block; // account for any element using help-block
margin-top: 5px;
margin-bottom: 10px;
color: lighten(@text-color, 25%); // lighten the text some for contrast
}
// Inline forms
//
// Make forms appear inline(-block) by adding the `.form-inline` class. Inline
// forms begin stacked on extra small (mobile) devices and then go inline when
// viewports reach <768px.
//
// Requires wrapping inputs and labels with `.form-group` for proper display of
// default HTML form controls and our custom form controls (e.g., input groups).
//
// Heads up! This is mixin-ed into `.navbar-form` in navbars.less.
.form-inline {
// Kick in the inline
@media (min-width: @screen-sm-min) {
// Inline-block all the things for "inline"
.form-group {
display: inline-block;
margin-bottom: 0;
vertical-align: middle;
}
// In navbar-form, allow folks to *not* use `.form-group`
.form-control {
display: inline-block;
width: auto; // Prevent labels from stacking above inputs in `.form-group`
vertical-align: middle;
}
// Make static controls behave like regular ones
.form-control-static {
display: inline-block;
}
.input-group {
display: inline-table;
vertical-align: middle;
.input-group-addon,
.input-group-btn,
.form-control {
width: auto;
}
}
// Input groups need that 100% width though
.input-group > .form-control {
width: 100%;
}
.control-label {
margin-bottom: 0;
vertical-align: middle;
}
// Remove default margin on radios/checkboxes that were used for stacking, and
// then undo the floating of radios and checkboxes to match.
.radio,
.checkbox {
display: inline-block;
margin-top: 0;
margin-bottom: 0;
vertical-align: middle;
label {
padding-left: 0;
}
}
.radio input[type="radio"],
.checkbox input[type="checkbox"] {
position: relative;
margin-left: 0;
}
// Re-override the feedback icon.
.has-feedback .form-control-feedback {
top: 0;
}
}
}
// Horizontal forms
//
// Horizontal forms are built on grid classes and allow you to create forms with
// labels on the left and inputs on the right.
.form-horizontal {
// Consistent vertical alignment of radios and checkboxes
//
// Labels also get some reset styles, but that is scoped to a media query below.
.radio,
.checkbox,
.radio-inline,
.checkbox-inline {
margin-top: 0;
margin-bottom: 0;
padding-top: (@padding-base-vertical + 1); // Default padding plus a border
}
// Account for padding we're adding to ensure the alignment and of help text
// and other content below items
.radio,
.checkbox {
min-height: (@line-height-computed + (@padding-base-vertical + 1));
}
// Make form groups behave like rows
.form-group {
.make-row();
}
// Reset spacing and right align labels, but scope to media queries so that
// labels on narrow viewports stack the same as a default form example.
@media (min-width: @screen-sm-min) {
.control-label {
text-align: right;
margin-bottom: 0;
padding-top: (@padding-base-vertical + 1); // Default padding plus a border
}
}
// Validation states
//
// Reposition the icon because it's now within a grid column and columns have
// `position: relative;` on them. Also accounts for the grid gutter padding.
.has-feedback .form-control-feedback {
right: (@grid-gutter-width / 2);
}
// Form group sizes
//
// Quick utility class for applying `.input-lg` and `.input-sm` styles to the
// inputs and labels within a `.form-group`.
.form-group-lg {
@media (min-width: @screen-sm-min) {
.control-label {
padding-top: ((@padding-large-vertical * @line-height-large) + 1);
}
}
}
.form-group-sm {
@media (min-width: @screen-sm-min) {
.control-label {
padding-top: (@padding-small-vertical + 1);
}
}
}
}

View File

@ -0,0 +1,305 @@
//
// Glyphicons for Bootstrap
//
// Since icons are fonts, they can be placed anywhere text is placed and are
// thus automatically sized to match the surrounding child. To use, create an
// inline element with the appropriate classes, like so:
//
// <a href="#"><span class="glyphicon glyphicon-star"></span> Star</a>
// Import the fonts
@font-face {
font-family: 'Glyphicons Halflings';
src: url('@{icon-font-path}@{icon-font-name}.eot');
src: url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype'),
url('@{icon-font-path}@{icon-font-name}.woff2') format('woff2'),
url('@{icon-font-path}@{icon-font-name}.woff') format('woff'),
url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype'),
url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg');
}
// Catchall baseclass
.glyphicon {
position: relative;
top: 1px;
display: inline-block;
font-family: 'Glyphicons Halflings';
font-style: normal;
font-weight: normal;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
// Individual icons
.glyphicon-asterisk { &:before { content: "\2a"; } }
.glyphicon-plus { &:before { content: "\2b"; } }
.glyphicon-euro,
.glyphicon-eur { &:before { content: "\20ac"; } }
.glyphicon-minus { &:before { content: "\2212"; } }
.glyphicon-cloud { &:before { content: "\2601"; } }
.glyphicon-envelope { &:before { content: "\2709"; } }
.glyphicon-pencil { &:before { content: "\270f"; } }
.glyphicon-glass { &:before { content: "\e001"; } }
.glyphicon-music { &:before { content: "\e002"; } }
.glyphicon-search { &:before { content: "\e003"; } }
.glyphicon-heart { &:before { content: "\e005"; } }
.glyphicon-star { &:before { content: "\e006"; } }
.glyphicon-star-empty { &:before { content: "\e007"; } }
.glyphicon-user { &:before { content: "\e008"; } }
.glyphicon-film { &:before { content: "\e009"; } }
.glyphicon-th-large { &:before { content: "\e010"; } }
.glyphicon-th { &:before { content: "\e011"; } }
.glyphicon-th-list { &:before { content: "\e012"; } }
.glyphicon-ok { &:before { content: "\e013"; } }
.glyphicon-remove { &:before { content: "\e014"; } }
.glyphicon-zoom-in { &:before { content: "\e015"; } }
.glyphicon-zoom-out { &:before { content: "\e016"; } }
.glyphicon-off { &:before { content: "\e017"; } }
.glyphicon-signal { &:before { content: "\e018"; } }
.glyphicon-cog { &:before { content: "\e019"; } }
.glyphicon-trash { &:before { content: "\e020"; } }
.glyphicon-home { &:before { content: "\e021"; } }
.glyphicon-file { &:before { content: "\e022"; } }
.glyphicon-time { &:before { content: "\e023"; } }
.glyphicon-road { &:before { content: "\e024"; } }
.glyphicon-download-alt { &:before { content: "\e025"; } }
.glyphicon-download { &:before { content: "\e026"; } }
.glyphicon-upload { &:before { content: "\e027"; } }
.glyphicon-inbox { &:before { content: "\e028"; } }
.glyphicon-play-circle { &:before { content: "\e029"; } }
.glyphicon-repeat { &:before { content: "\e030"; } }
.glyphicon-refresh { &:before { content: "\e031"; } }
.glyphicon-list-alt { &:before { content: "\e032"; } }
.glyphicon-lock { &:before { content: "\e033"; } }
.glyphicon-flag { &:before { content: "\e034"; } }
.glyphicon-headphones { &:before { content: "\e035"; } }
.glyphicon-volume-off { &:before { content: "\e036"; } }
.glyphicon-volume-down { &:before { content: "\e037"; } }
.glyphicon-volume-up { &:before { content: "\e038"; } }
.glyphicon-qrcode { &:before { content: "\e039"; } }
.glyphicon-barcode { &:before { content: "\e040"; } }
.glyphicon-tag { &:before { content: "\e041"; } }
.glyphicon-tags { &:before { content: "\e042"; } }
.glyphicon-book { &:before { content: "\e043"; } }
.glyphicon-bookmark { &:before { content: "\e044"; } }
.glyphicon-print { &:before { content: "\e045"; } }
.glyphicon-camera { &:before { content: "\e046"; } }
.glyphicon-font { &:before { content: "\e047"; } }
.glyphicon-bold { &:before { content: "\e048"; } }
.glyphicon-italic { &:before { content: "\e049"; } }
.glyphicon-text-height { &:before { content: "\e050"; } }
.glyphicon-text-width { &:before { content: "\e051"; } }
.glyphicon-align-left { &:before { content: "\e052"; } }
.glyphicon-align-center { &:before { content: "\e053"; } }
.glyphicon-align-right { &:before { content: "\e054"; } }
.glyphicon-align-justify { &:before { content: "\e055"; } }
.glyphicon-list { &:before { content: "\e056"; } }
.glyphicon-indent-left { &:before { content: "\e057"; } }
.glyphicon-indent-right { &:before { content: "\e058"; } }
.glyphicon-facetime-video { &:before { content: "\e059"; } }
.glyphicon-picture { &:before { content: "\e060"; } }
.glyphicon-map-marker { &:before { content: "\e062"; } }
.glyphicon-adjust { &:before { content: "\e063"; } }
.glyphicon-tint { &:before { content: "\e064"; } }
.glyphicon-edit { &:before { content: "\e065"; } }
.glyphicon-share { &:before { content: "\e066"; } }
.glyphicon-check { &:before { content: "\e067"; } }
.glyphicon-move { &:before { content: "\e068"; } }
.glyphicon-step-backward { &:before { content: "\e069"; } }
.glyphicon-fast-backward { &:before { content: "\e070"; } }
.glyphicon-backward { &:before { content: "\e071"; } }
.glyphicon-play { &:before { content: "\e072"; } }
.glyphicon-pause { &:before { content: "\e073"; } }
.glyphicon-stop { &:before { content: "\e074"; } }
.glyphicon-forward { &:before { content: "\e075"; } }
.glyphicon-fast-forward { &:before { content: "\e076"; } }
.glyphicon-step-forward { &:before { content: "\e077"; } }
.glyphicon-eject { &:before { content: "\e078"; } }
.glyphicon-chevron-left { &:before { content: "\e079"; } }
.glyphicon-chevron-right { &:before { content: "\e080"; } }
.glyphicon-plus-sign { &:before { content: "\e081"; } }
.glyphicon-minus-sign { &:before { content: "\e082"; } }
.glyphicon-remove-sign { &:before { content: "\e083"; } }
.glyphicon-ok-sign { &:before { content: "\e084"; } }
.glyphicon-question-sign { &:before { content: "\e085"; } }
.glyphicon-info-sign { &:before { content: "\e086"; } }
.glyphicon-screenshot { &:before { content: "\e087"; } }
.glyphicon-remove-circle { &:before { content: "\e088"; } }
.glyphicon-ok-circle { &:before { content: "\e089"; } }
.glyphicon-ban-circle { &:before { content: "\e090"; } }
.glyphicon-arrow-left { &:before { content: "\e091"; } }
.glyphicon-arrow-right { &:before { content: "\e092"; } }
.glyphicon-arrow-up { &:before { content: "\e093"; } }
.glyphicon-arrow-down { &:before { content: "\e094"; } }
.glyphicon-share-alt { &:before { content: "\e095"; } }
.glyphicon-resize-full { &:before { content: "\e096"; } }
.glyphicon-resize-small { &:before { content: "\e097"; } }
.glyphicon-exclamation-sign { &:before { content: "\e101"; } }
.glyphicon-gift { &:before { content: "\e102"; } }
.glyphicon-leaf { &:before { content: "\e103"; } }
.glyphicon-fire { &:before { content: "\e104"; } }
.glyphicon-eye-open { &:before { content: "\e105"; } }
.glyphicon-eye-close { &:before { content: "\e106"; } }
.glyphicon-warning-sign { &:before { content: "\e107"; } }
.glyphicon-plane { &:before { content: "\e108"; } }
.glyphicon-calendar { &:before { content: "\e109"; } }
.glyphicon-random { &:before { content: "\e110"; } }
.glyphicon-comment { &:before { content: "\e111"; } }
.glyphicon-magnet { &:before { content: "\e112"; } }
.glyphicon-chevron-up { &:before { content: "\e113"; } }
.glyphicon-chevron-down { &:before { content: "\e114"; } }
.glyphicon-retweet { &:before { content: "\e115"; } }
.glyphicon-shopping-cart { &:before { content: "\e116"; } }
.glyphicon-folder-close { &:before { content: "\e117"; } }
.glyphicon-folder-open { &:before { content: "\e118"; } }
.glyphicon-resize-vertical { &:before { content: "\e119"; } }
.glyphicon-resize-horizontal { &:before { content: "\e120"; } }
.glyphicon-hdd { &:before { content: "\e121"; } }
.glyphicon-bullhorn { &:before { content: "\e122"; } }
.glyphicon-bell { &:before { content: "\e123"; } }
.glyphicon-certificate { &:before { content: "\e124"; } }
.glyphicon-thumbs-up { &:before { content: "\e125"; } }
.glyphicon-thumbs-down { &:before { content: "\e126"; } }
.glyphicon-hand-right { &:before { content: "\e127"; } }
.glyphicon-hand-left { &:before { content: "\e128"; } }
.glyphicon-hand-up { &:before { content: "\e129"; } }
.glyphicon-hand-down { &:before { content: "\e130"; } }
.glyphicon-circle-arrow-right { &:before { content: "\e131"; } }
.glyphicon-circle-arrow-left { &:before { content: "\e132"; } }
.glyphicon-circle-arrow-up { &:before { content: "\e133"; } }
.glyphicon-circle-arrow-down { &:before { content: "\e134"; } }
.glyphicon-globe { &:before { content: "\e135"; } }
.glyphicon-wrench { &:before { content: "\e136"; } }
.glyphicon-tasks { &:before { content: "\e137"; } }
.glyphicon-filter { &:before { content: "\e138"; } }
.glyphicon-briefcase { &:before { content: "\e139"; } }
.glyphicon-fullscreen { &:before { content: "\e140"; } }
.glyphicon-dashboard { &:before { content: "\e141"; } }
.glyphicon-paperclip { &:before { content: "\e142"; } }
.glyphicon-heart-empty { &:before { content: "\e143"; } }
.glyphicon-link { &:before { content: "\e144"; } }
.glyphicon-phone { &:before { content: "\e145"; } }
.glyphicon-pushpin { &:before { content: "\e146"; } }
.glyphicon-usd { &:before { content: "\e148"; } }
.glyphicon-gbp { &:before { content: "\e149"; } }
.glyphicon-sort { &:before { content: "\e150"; } }
.glyphicon-sort-by-alphabet { &:before { content: "\e151"; } }
.glyphicon-sort-by-alphabet-alt { &:before { content: "\e152"; } }
.glyphicon-sort-by-order { &:before { content: "\e153"; } }
.glyphicon-sort-by-order-alt { &:before { content: "\e154"; } }
.glyphicon-sort-by-attributes { &:before { content: "\e155"; } }
.glyphicon-sort-by-attributes-alt { &:before { content: "\e156"; } }
.glyphicon-unchecked { &:before { content: "\e157"; } }
.glyphicon-expand { &:before { content: "\e158"; } }
.glyphicon-collapse-down { &:before { content: "\e159"; } }
.glyphicon-collapse-up { &:before { content: "\e160"; } }
.glyphicon-log-in { &:before { content: "\e161"; } }
.glyphicon-flash { &:before { content: "\e162"; } }
.glyphicon-log-out { &:before { content: "\e163"; } }
.glyphicon-new-window { &:before { content: "\e164"; } }
.glyphicon-record { &:before { content: "\e165"; } }
.glyphicon-save { &:before { content: "\e166"; } }
.glyphicon-open { &:before { content: "\e167"; } }
.glyphicon-saved { &:before { content: "\e168"; } }
.glyphicon-import { &:before { content: "\e169"; } }
.glyphicon-export { &:before { content: "\e170"; } }
.glyphicon-send { &:before { content: "\e171"; } }
.glyphicon-floppy-disk { &:before { content: "\e172"; } }
.glyphicon-floppy-saved { &:before { content: "\e173"; } }
.glyphicon-floppy-remove { &:before { content: "\e174"; } }
.glyphicon-floppy-save { &:before { content: "\e175"; } }
.glyphicon-floppy-open { &:before { content: "\e176"; } }
.glyphicon-credit-card { &:before { content: "\e177"; } }
.glyphicon-transfer { &:before { content: "\e178"; } }
.glyphicon-cutlery { &:before { content: "\e179"; } }
.glyphicon-header { &:before { content: "\e180"; } }
.glyphicon-compressed { &:before { content: "\e181"; } }
.glyphicon-earphone { &:before { content: "\e182"; } }
.glyphicon-phone-alt { &:before { content: "\e183"; } }
.glyphicon-tower { &:before { content: "\e184"; } }
.glyphicon-stats { &:before { content: "\e185"; } }
.glyphicon-sd-video { &:before { content: "\e186"; } }
.glyphicon-hd-video { &:before { content: "\e187"; } }
.glyphicon-subtitles { &:before { content: "\e188"; } }
.glyphicon-sound-stereo { &:before { content: "\e189"; } }
.glyphicon-sound-dolby { &:before { content: "\e190"; } }
.glyphicon-sound-5-1 { &:before { content: "\e191"; } }
.glyphicon-sound-6-1 { &:before { content: "\e192"; } }
.glyphicon-sound-7-1 { &:before { content: "\e193"; } }
.glyphicon-copyright-mark { &:before { content: "\e194"; } }
.glyphicon-registration-mark { &:before { content: "\e195"; } }
.glyphicon-cloud-download { &:before { content: "\e197"; } }
.glyphicon-cloud-upload { &:before { content: "\e198"; } }
.glyphicon-tree-conifer { &:before { content: "\e199"; } }
.glyphicon-tree-deciduous { &:before { content: "\e200"; } }
.glyphicon-cd { &:before { content: "\e201"; } }
.glyphicon-save-file { &:before { content: "\e202"; } }
.glyphicon-open-file { &:before { content: "\e203"; } }
.glyphicon-level-up { &:before { content: "\e204"; } }
.glyphicon-copy { &:before { content: "\e205"; } }
.glyphicon-paste { &:before { content: "\e206"; } }
// The following 2 Glyphicons are omitted for the time being because
// they currently use Unicode codepoints that are outside the
// Basic Multilingual Plane (BMP). Older buggy versions of WebKit can't handle
// non-BMP codepoints in CSS string escapes, and thus can't display these two icons.
// Notably, the bug affects some older versions of the Android Browser.
// More info: https://github.com/twbs/bootstrap/issues/10106
// .glyphicon-door { &:before { content: "\1f6aa"; } }
// .glyphicon-key { &:before { content: "\1f511"; } }
.glyphicon-alert { &:before { content: "\e209"; } }
.glyphicon-equalizer { &:before { content: "\e210"; } }
.glyphicon-king { &:before { content: "\e211"; } }
.glyphicon-queen { &:before { content: "\e212"; } }
.glyphicon-pawn { &:before { content: "\e213"; } }
.glyphicon-bishop { &:before { content: "\e214"; } }
.glyphicon-knight { &:before { content: "\e215"; } }
.glyphicon-baby-formula { &:before { content: "\e216"; } }
.glyphicon-tent { &:before { content: "\26fa"; } }
.glyphicon-blackboard { &:before { content: "\e218"; } }
.glyphicon-bed { &:before { content: "\e219"; } }
.glyphicon-apple { &:before { content: "\f8ff"; } }
.glyphicon-erase { &:before { content: "\e221"; } }
.glyphicon-hourglass { &:before { content: "\231b"; } }
.glyphicon-lamp { &:before { content: "\e223"; } }
.glyphicon-duplicate { &:before { content: "\e224"; } }
.glyphicon-piggy-bank { &:before { content: "\e225"; } }
.glyphicon-scissors { &:before { content: "\e226"; } }
.glyphicon-bitcoin { &:before { content: "\e227"; } }
.glyphicon-btc { &:before { content: "\e227"; } }
.glyphicon-xbt { &:before { content: "\e227"; } }
.glyphicon-yen { &:before { content: "\00a5"; } }
.glyphicon-jpy { &:before { content: "\00a5"; } }
.glyphicon-ruble { &:before { content: "\20bd"; } }
.glyphicon-rub { &:before { content: "\20bd"; } }
.glyphicon-scale { &:before { content: "\e230"; } }
.glyphicon-ice-lolly { &:before { content: "\e231"; } }
.glyphicon-ice-lolly-tasted { &:before { content: "\e232"; } }
.glyphicon-education { &:before { content: "\e233"; } }
.glyphicon-option-horizontal { &:before { content: "\e234"; } }
.glyphicon-option-vertical { &:before { content: "\e235"; } }
.glyphicon-menu-hamburger { &:before { content: "\e236"; } }
.glyphicon-modal-window { &:before { content: "\e237"; } }
.glyphicon-oil { &:before { content: "\e238"; } }
.glyphicon-grain { &:before { content: "\e239"; } }
.glyphicon-sunglasses { &:before { content: "\e240"; } }
.glyphicon-text-size { &:before { content: "\e241"; } }
.glyphicon-text-color { &:before { content: "\e242"; } }
.glyphicon-text-background { &:before { content: "\e243"; } }
.glyphicon-object-align-top { &:before { content: "\e244"; } }
.glyphicon-object-align-bottom { &:before { content: "\e245"; } }
.glyphicon-object-align-horizontal{ &:before { content: "\e246"; } }
.glyphicon-object-align-left { &:before { content: "\e247"; } }
.glyphicon-object-align-vertical { &:before { content: "\e248"; } }
.glyphicon-object-align-right { &:before { content: "\e249"; } }
.glyphicon-triangle-right { &:before { content: "\e250"; } }
.glyphicon-triangle-left { &:before { content: "\e251"; } }
.glyphicon-triangle-bottom { &:before { content: "\e252"; } }
.glyphicon-triangle-top { &:before { content: "\e253"; } }
.glyphicon-console { &:before { content: "\e254"; } }
.glyphicon-superscript { &:before { content: "\e255"; } }
.glyphicon-subscript { &:before { content: "\e256"; } }
.glyphicon-menu-left { &:before { content: "\e257"; } }
.glyphicon-menu-right { &:before { content: "\e258"; } }
.glyphicon-menu-down { &:before { content: "\e259"; } }
.glyphicon-menu-up { &:before { content: "\e260"; } }

84
doc/bootstrap/grid.less Normal file
View File

@ -0,0 +1,84 @@
//
// Grid system
// --------------------------------------------------
// Container widths
//
// Set the container width, and override it for fixed navbars in media queries.
.tb-container {
.container-fixed();
@media (min-width: @screen-sm-min) {
width: @container-sm;
}
@media (min-width: @screen-md-min) {
width: @container-md;
}
@media (min-width: @screen-lg-min) {
width: @container-lg;
}
}
// Fluid container
//
// Utilizes the mixin meant for fixed width containers, but without any defined
// width for fluid, full width layouts.
.container-fluid {
.container-fixed();
}
// Row
//
// Rows contain and clear the floats of your columns.
.row {
.make-row();
}
// Columns
//
// Common styles for small and large grid columns
.make-grid-columns();
// Extra small grid
//
// Columns, offsets, pushes, and pulls for extra small devices like
// smartphones.
.make-grid(xs);
// Small grid
//
// Columns, offsets, pushes, and pulls for the small device range, from phones
// to tablets.
@media (min-width: @screen-sm-min) {
.make-grid(sm);
}
// Medium grid
//
// Columns, offsets, pushes, and pulls for the desktop device range.
@media (min-width: @screen-md-min) {
.make-grid(md);
}
// Large grid
//
// Columns, offsets, pushes, and pulls for the large desktop device range.
@media (min-width: @screen-lg-min) {
.make-grid(lg);
}

View File

@ -0,0 +1,166 @@
//
// Input groups
// --------------------------------------------------
// Base styles
// -------------------------
.input-group {
position: relative; // For dropdowns
display: table;
border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table
// Undo padding and float of grid classes
&[class*="col-"] {
float: none;
padding-left: 0;
padding-right: 0;
}
.form-control {
// Ensure that the input is always above the *appended* addon button for
// proper border colors.
position: relative;
z-index: 2;
// IE9 fubars the placeholder attribute in text inputs and the arrows on
// select elements in input groups. To fix it, we float the input. Details:
// https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855
float: left;
width: 100%;
margin-bottom: 0;
}
}
// Sizing options
//
// Remix the default form control sizing classes into new ones for easier
// manipulation.
.input-group-lg > .form-control,
.input-group-lg > .input-group-addon,
.input-group-lg > .input-group-btn > .btn {
.input-lg();
}
.input-group-sm > .form-control,
.input-group-sm > .input-group-addon,
.input-group-sm > .input-group-btn > .btn {
.input-sm();
}
// Display as table-cell
// -------------------------
.input-group-addon,
.input-group-btn,
.input-group .form-control {
display: table-cell;
&:not(:first-child):not(:last-child) {
border-radius: 0;
}
}
// Addon and addon wrapper for buttons
.input-group-addon,
.input-group-btn {
width: 1%;
white-space: nowrap;
vertical-align: middle; // Match the inputs
}
// Text input groups
// -------------------------
.input-group-addon {
padding: @padding-base-vertical @padding-base-horizontal;
font-size: @font-size-base;
font-weight: normal;
line-height: 1;
color: @input-color;
text-align: center;
background-color: @input-group-addon-bg;
border: 1px solid @input-group-addon-border-color;
border-radius: @border-radius-base;
// Sizing
&.input-sm {
padding: @padding-small-vertical @padding-small-horizontal;
font-size: @font-size-small;
border-radius: @border-radius-small;
}
&.input-lg {
padding: @padding-large-vertical @padding-large-horizontal;
font-size: @font-size-large;
border-radius: @border-radius-large;
}
// Nuke default margins from checkboxes and radios to vertically center within.
input[type="radio"],
input[type="checkbox"] {
margin-top: 0;
}
}
// Reset rounded corners
.input-group .form-control:first-child,
.input-group-addon:first-child,
.input-group-btn:first-child > .btn,
.input-group-btn:first-child > .btn-group > .btn,
.input-group-btn:first-child > .dropdown-toggle,
.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
.border-right-radius(0);
}
.input-group-addon:first-child {
border-right: 0;
}
.input-group .form-control:last-child,
.input-group-addon:last-child,
.input-group-btn:last-child > .btn,
.input-group-btn:last-child > .btn-group > .btn,
.input-group-btn:last-child > .dropdown-toggle,
.input-group-btn:first-child > .btn:not(:first-child),
.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
.border-left-radius(0);
}
.input-group-addon:last-child {
border-left: 0;
}
// Button input groups
// -------------------------
.input-group-btn {
position: relative;
// Jankily prevent input button groups from wrapping with `white-space` and
// `font-size` in combination with `inline-block` on buttons.
font-size: 0;
white-space: nowrap;
// Negative margin for spacing, position for bringing hovered/focused/actived
// element above the siblings.
> .btn {
position: relative;
+ .btn {
margin-left: -1px;
}
// Bring the "active" button to the front
&:hover,
&:focus,
&:active {
z-index: 2;
}
}
// Negative margin to only have a 1px border between the two
&:first-child {
> .btn,
> .btn-group {
margin-right: -1px;
}
}
&:last-child {
> .btn,
> .btn-group {
margin-left: -1px;
}
}
}

View File

@ -0,0 +1,50 @@
//
// Jumbotron
// --------------------------------------------------
.jumbotron {
padding: @jumbotron-padding (@jumbotron-padding / 2);
margin-bottom: @jumbotron-padding;
color: @jumbotron-color;
background-color: @jumbotron-bg;
h1,
.h1 {
color: @jumbotron-heading-color;
}
p {
margin-bottom: (@jumbotron-padding / 2);
font-size: @jumbotron-font-size;
font-weight: 200;
}
> hr {
border-top-color: darken(@jumbotron-bg, 10%);
}
.tb-container &,
.container-fluid & {
border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container
}
.tb-container {
max-width: 100%;
}
@media screen and (min-width: @screen-sm-min) {
padding: (@jumbotron-padding * 1.6) 0;
.tb-container &,
.container-fluid & {
padding-left: (@jumbotron-padding * 2);
padding-right: (@jumbotron-padding * 2);
}
h1,
.h1 {
font-size: (@font-size-base * 4.5);
}
}
}

64
doc/bootstrap/labels.less Normal file
View File

@ -0,0 +1,64 @@
//
// Labels
// --------------------------------------------------
.label {
display: inline;
padding: .2em .6em .3em;
font-size: 75%;
font-weight: bold;
line-height: 1;
color: @label-color;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: .25em;
// Add hover effects, but only for links
a& {
&:hover,
&:focus {
color: @label-link-hover-color;
text-decoration: none;
cursor: pointer;
}
}
// Empty labels collapse automatically (not available in IE8)
&:empty {
display: none;
}
// Quick fix for labels in buttons
.btn & {
position: relative;
top: -1px;
}
}
// Colors
// Contextual variations (linked labels get darker on :hover)
.label-default {
.label-variant(@label-default-bg);
}
.label-primary {
.label-variant(@label-primary-bg);
}
.label-success {
.label-variant(@label-success-bg);
}
.label-info {
.label-variant(@label-info-bg);
}
.label-warning {
.label-variant(@label-warning-bg);
}
.label-danger {
.label-variant(@label-danger-bg);
}

View File

@ -0,0 +1,124 @@
//
// List groups
// --------------------------------------------------
// Base class
//
// Easily usable on <ul>, <ol>, or <div>.
.list-group {
// No need to set list-style: none; since .list-group-item is block level
margin-bottom: 20px;
padding-left: 0; // reset padding because ul and ol
}
// Individual list items
//
// Use on `li`s or `div`s within the `.list-group` parent.
.list-group-item {
position: relative;
display: block;
padding: 10px 15px;
// Place the border on the list items and negative margin up for better styling
margin-bottom: -1px;
background-color: @list-group-bg;
border: 1px solid @list-group-border;
// Round the first and last items
&:first-child {
.border-top-radius(@list-group-border-radius);
}
&:last-child {
margin-bottom: 0;
.border-bottom-radius(@list-group-border-radius);
}
}
// Linked list items
//
// Use anchor elements instead of `li`s or `div`s to create linked list items.
// Includes an extra `.active` modifier class for showing selected items.
a.list-group-item {
color: @list-group-link-color;
.list-group-item-heading {
color: @list-group-link-heading-color;
}
// Hover state
&:hover,
&:focus {
text-decoration: none;
color: @list-group-link-hover-color;
background-color: @list-group-hover-bg;
}
}
.list-group-item {
// Disabled state
&.disabled,
&.disabled:hover,
&.disabled:focus {
background-color: @list-group-disabled-bg;
color: @list-group-disabled-color;
cursor: @cursor-disabled;
// Force color to inherit for custom content
.list-group-item-heading {
color: inherit;
}
.list-group-item-text {
color: @list-group-disabled-text-color;
}
}
// Active class on item itself, not parent
&.active,
&.active:hover,
&.active:focus {
z-index: 2; // Place active items above their siblings for proper border styling
color: @list-group-active-color;
background-color: @list-group-active-bg;
border-color: @list-group-active-border;
// Force color to inherit for custom content
.list-group-item-heading,
.list-group-item-heading > small,
.list-group-item-heading > .small {
color: inherit;
}
.list-group-item-text {
color: @list-group-active-text-color;
}
}
}
// Contextual variants
//
// Add modifier classes to change text and background color on individual items.
// Organizationally, this must come after the `:hover` states.
.list-group-item-variant(success; @state-success-bg; @state-success-text);
.list-group-item-variant(info; @state-info-bg; @state-info-text);
.list-group-item-variant(warning; @state-warning-bg; @state-warning-text);
.list-group-item-variant(danger; @state-danger-bg; @state-danger-text);
// Custom content options
//
// Extra classes for creating well-formatted content within `.list-group-item`s.
.list-group-item-heading {
margin-top: 0;
margin-bottom: 5px;
}
.list-group-item-text {
margin-bottom: 0;
line-height: 1.3;
}

61
doc/bootstrap/media.less Normal file
View File

@ -0,0 +1,61 @@
.media {
// Proper spacing between instances of .media
margin-top: 15px;
&:first-child {
margin-top: 0;
}
}
.media,
.media-body {
zoom: 1;
overflow: hidden;
}
.media-body {
width: 10000px;
}
.media-object {
display: block;
}
.media-right,
.media > .pull-right {
padding-left: 10px;
}
.media-left,
.media > .pull-left {
padding-right: 10px;
}
.media-left,
.media-right,
.media-body {
display: table-cell;
vertical-align: top;
}
.media-middle {
vertical-align: middle;
}
.media-bottom {
vertical-align: bottom;
}
// Reset margins on headings for tighter default spacing
.media-heading {
margin-top: 0;
margin-bottom: 5px;
}
// Media list variation
//
// Undo default ul/ol styles
.media-list {
padding-left: 0;
list-style: none;
}

39
doc/bootstrap/mixins.less Normal file
View File

@ -0,0 +1,39 @@
// Mixins
// --------------------------------------------------
// Utilities
@import "mixins/hide-text.less";
@import "mixins/opacity.less";
@import "mixins/image.less";
@import "mixins/labels.less";
@import "mixins/reset-filter.less";
@import "mixins/resize.less";
@import "mixins/responsive-visibility.less";
@import "mixins/size.less";
@import "mixins/tab-focus.less";
@import "mixins/text-emphasis.less";
@import "mixins/text-overflow.less";
@import "mixins/vendor-prefixes.less";
// Components
@import "mixins/alerts.less";
@import "mixins/buttons.less";
@import "mixins/panels.less";
@import "mixins/pagination.less";
@import "mixins/list-group.less";
@import "mixins/nav-divider.less";
@import "mixins/forms.less";
@import "mixins/progress-bar.less";
@import "mixins/table-row.less";
// Skins
@import "mixins/background-variant.less";
@import "mixins/border-radius.less";
@import "mixins/gradients.less";
// Layout
@import "mixins/clearfix.less";
@import "mixins/center-block.less";
@import "mixins/nav-vertical-align.less";
@import "mixins/grid-framework.less";
@import "mixins/grid.less";

View File

@ -0,0 +1,14 @@
// Alerts
.alert-variant(@background; @border; @text-color) {
background-color: @background;
border-color: @border;
color: @text-color;
hr {
border-top-color: darken(@border, 5%);
}
.alert-link {
color: darken(@text-color, 10%);
}
}

View File

@ -0,0 +1,8 @@
// Contextual backgrounds
.bg-variant(@color) {
background-color: @color;
a&:hover {
background-color: darken(@color, 10%);
}
}

View File

@ -0,0 +1,18 @@
// Single side border-radius
.border-top-radius(@radius) {
border-top-right-radius: @radius;
border-top-left-radius: @radius;
}
.border-right-radius(@radius) {
border-bottom-right-radius: @radius;
border-top-right-radius: @radius;
}
.border-bottom-radius(@radius) {
border-bottom-right-radius: @radius;
border-bottom-left-radius: @radius;
}
.border-left-radius(@radius) {
border-bottom-left-radius: @radius;
border-top-left-radius: @radius;
}

View File

@ -0,0 +1,52 @@
// Button variants
//
// Easily pump out default styles, as well as :hover, :focus, :active,
// and disabled options for all buttons
.button-variant(@color; @background; @border) {
color: @color;
background-color: @background;
border-color: @border;
&:hover,
&:focus,
&.focus,
&:active,
&.active,
.open > .dropdown-toggle& {
color: @color;
background-color: darken(@background, 10%);
border-color: darken(@border, 12%);
}
&:active,
&.active,
.open > .dropdown-toggle& {
background-image: none;
}
&.disabled,
&[disabled],
fieldset[disabled] & {
&,
&:hover,
&:focus,
&.focus,
&:active,
&.active {
background-color: @background;
border-color: @border;
}
}
.badge {
color: @background;
background-color: @color;
}
}
// Button sizes
.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
padding: @padding-vertical @padding-horizontal;
font-size: @font-size;
line-height: @line-height;
border-radius: @border-radius;
}

View File

@ -0,0 +1,7 @@
// Center-align a block level element
.center-block() {
display: block;
margin-left: auto;
margin-right: auto;
}

View File

@ -0,0 +1,22 @@
// Clearfix
//
// For modern browsers
// 1. The space content is one way to avoid an Opera bug when the
// contenteditable attribute is included anywhere else in the document.
// Otherwise it causes space to appear at the top and bottom of elements
// that are clearfixed.
// 2. The use of `table` rather than `block` is only necessary if using
// `:before` to contain the top-margins of child elements.
//
// Source: http://nicolasgallagher.com/micro-clearfix-hack/
.clearfix() {
&:before,
&:after {
content: " "; // 1
display: table; // 2
}
&:after {
clear: both;
}
}

View File

@ -0,0 +1,85 @@
// Form validation states
//
// Used in forms.less to generate the form validation CSS for warnings, errors,
// and successes.
.form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {
// Color the label and help text
.help-block,
.control-label,
.radio,
.checkbox,
.radio-inline,
.checkbox-inline,
&.radio label,
&.checkbox label,
&.radio-inline label,
&.checkbox-inline label {
color: @text-color;
}
// Set the border and box shadow on specific inputs to match
.form-control {
border-color: @border-color;
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work
&:focus {
border-color: darken(@border-color, 10%);
@shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);
.box-shadow(@shadow);
}
}
// Set validation states also for addons
.input-group-addon {
color: @text-color;
border-color: @border-color;
background-color: @background-color;
}
// Optional feedback icon
.form-control-feedback {
color: @text-color;
}
}
// Form control focus state
//
// Generate a customized focus state and for any input with the specified color,
// which defaults to the `@input-border-focus` variable.
//
// We highly encourage you to not customize the default value, but instead use
// this to tweak colors on an as-needed basis. This aesthetic change is based on
// WebKit's default styles, but applicable to a wider range of browsers. Its
// usability and accessibility should be taken into account with any change.
//
// Example usage: change the default blue border and shadow to white for better
// contrast against a dark gray background.
.form-control-focus(@color: @input-border-focus) {
@color-rgba: rgba(red(@color), green(@color), blue(@color), .6);
&:focus {
border-color: @color;
outline: 0;
.box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}");
}
}
// Form control sizing
//
// Relative text size, padding, and border-radii changes for form controls. For
// horizontal sizing, wrap controls in the predefined grid classes. `<select>`
// element gets special love because it's special, and that's a fact!
.input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
height: @input-height;
padding: @padding-vertical @padding-horizontal;
font-size: @font-size;
line-height: @line-height;
border-radius: @border-radius;
select& {
height: @input-height;
line-height: @input-height;
}
textarea&,
select[multiple]& {
height: auto;
}
}

View File

@ -0,0 +1,59 @@
// Gradients
#gradient {
// Horizontal gradient, from left to right
//
// Creates two color stops, start and end, by specifying a color and position for each color stop.
// Color stops are not available in IE9 and below.
.horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+
background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12
background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
background-repeat: repeat-x;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down
}
// Vertical gradient, from top to bottom
//
// Creates two color stops, start and end, by specifying a color and position for each color stop.
// Color stops are not available in IE9 and below.
.vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+
background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12
background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
background-repeat: repeat-x;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down
}
.directional(@start-color: #555; @end-color: #333; @deg: 45deg) {
background-repeat: repeat-x;
background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+
background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12
background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
}
.horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);
background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);
background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);
background-repeat: no-repeat;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
}
.vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);
background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);
background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);
background-repeat: no-repeat;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
}
.radial(@inner-color: #555; @outer-color: #333) {
background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);
background-image: radial-gradient(circle, @inner-color, @outer-color);
background-repeat: no-repeat;
}
.striped(@color: rgba(255,255,255,.15); @angle: 45deg) {
background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
}
}

View File

@ -0,0 +1,91 @@
// Framework grid generation
//
// Used only by Bootstrap to generate the correct number of grid classes given
// any value of `@grid-columns`.
.make-grid-columns() {
// Common styles for all sizes of grid columns, widths 1-12
.col(@index) { // initial
@item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
.col((@index + 1), @item);
}
.col(@index, @list) when (@index =< @grid-columns) { // general; "=<" isn't a typo
@item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
.col((@index + 1), ~"@{list}, @{item}");
}
.col(@index, @list) when (@index > @grid-columns) { // terminal
@{list} {
position: relative;
// Prevent columns from collapsing when empty
min-height: 1px;
// Inner gutter via padding
padding-left: (@grid-gutter-width / 2);
padding-right: (@grid-gutter-width / 2);
}
}
.col(1); // kickstart it
}
.float-grid-columns(@class) {
.col(@index) { // initial
@item: ~".col-@{class}-@{index}";
.col((@index + 1), @item);
}
.col(@index, @list) when (@index =< @grid-columns) { // general
@item: ~".col-@{class}-@{index}";
.col((@index + 1), ~"@{list}, @{item}");
}
.col(@index, @list) when (@index > @grid-columns) { // terminal
@{list} {
float: left;
}
}
.col(1); // kickstart it
}
.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {
.col-@{class}-@{index} {
width: percentage((@index / @grid-columns));
}
}
.calc-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {
.col-@{class}-push-@{index} {
left: percentage((@index / @grid-columns));
}
}
.calc-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {
.col-@{class}-push-0 {
left: auto;
}
}
.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {
.col-@{class}-pull-@{index} {
right: percentage((@index / @grid-columns));
}
}
.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {
.col-@{class}-pull-0 {
right: auto;
}
}
.calc-grid-column(@index, @class, @type) when (@type = offset) {
.col-@{class}-offset-@{index} {
margin-left: percentage((@index / @grid-columns));
}
}
// Basic looping in LESS
.loop-grid-columns(@index, @class, @type) when (@index >= 0) {
.calc-grid-column(@index, @class, @type);
// next iteration
.loop-grid-columns((@index - 1), @class, @type);
}
// Create grid for specific class
.make-grid(@class) {
.float-grid-columns(@class);
.loop-grid-columns(@grid-columns, @class, width);
.loop-grid-columns(@grid-columns, @class, pull);
.loop-grid-columns(@grid-columns, @class, push);
.loop-grid-columns(@grid-columns, @class, offset);
}

View File

@ -0,0 +1,122 @@
// Grid system
//
// Generate semantic grid columns with these mixins.
// Centered container element
.container-fixed(@gutter: @grid-gutter-width) {
margin-right: auto;
margin-left: auto;
padding-left: (@gutter / 2);
padding-right: (@gutter / 2);
&:extend(.clearfix all);
}
// Creates a wrapper for a series of columns
.make-row(@gutter: @grid-gutter-width) {
margin-left: (@gutter / -2);
margin-right: (@gutter / -2);
&:extend(.clearfix all);
}
// Generate the extra small columns
.make-xs-column(@columns; @gutter: @grid-gutter-width) {
position: relative;
float: left;
width: percentage((@columns / @grid-columns));
min-height: 1px;
padding-left: (@gutter / 2);
padding-right: (@gutter / 2);
}
.make-xs-column-offset(@columns) {
margin-left: percentage((@columns / @grid-columns));
}
.make-xs-column-push(@columns) {
left: percentage((@columns / @grid-columns));
}
.make-xs-column-pull(@columns) {
right: percentage((@columns / @grid-columns));
}
// Generate the small columns
.make-sm-column(@columns; @gutter: @grid-gutter-width) {
position: relative;
min-height: 1px;
padding-left: (@gutter / 2);
padding-right: (@gutter / 2);
@media (min-width: @screen-sm-min) {
float: left;
width: percentage((@columns / @grid-columns));
}
}
.make-sm-column-offset(@columns) {
@media (min-width: @screen-sm-min) {
margin-left: percentage((@columns / @grid-columns));
}
}
.make-sm-column-push(@columns) {
@media (min-width: @screen-sm-min) {
left: percentage((@columns / @grid-columns));
}
}
.make-sm-column-pull(@columns) {
@media (min-width: @screen-sm-min) {
right: percentage((@columns / @grid-columns));
}
}
// Generate the medium columns
.make-md-column(@columns; @gutter: @grid-gutter-width) {
position: relative;
min-height: 1px;
padding-left: (@gutter / 2);
padding-right: (@gutter / 2);
@media (min-width: @screen-md-min) {
float: left;
width: percentage((@columns / @grid-columns));
}
}
.make-md-column-offset(@columns) {
@media (min-width: @screen-md-min) {
margin-left: percentage((@columns / @grid-columns));
}
}
.make-md-column-push(@columns) {
@media (min-width: @screen-md-min) {
left: percentage((@columns / @grid-columns));
}
}
.make-md-column-pull(@columns) {
@media (min-width: @screen-md-min) {
right: percentage((@columns / @grid-columns));
}
}
// Generate the large columns
.make-lg-column(@columns; @gutter: @grid-gutter-width) {
position: relative;
min-height: 1px;
padding-left: (@gutter / 2);
padding-right: (@gutter / 2);
@media (min-width: @screen-lg-min) {
float: left;
width: percentage((@columns / @grid-columns));
}
}
.make-lg-column-offset(@columns) {
@media (min-width: @screen-lg-min) {
margin-left: percentage((@columns / @grid-columns));
}
}
.make-lg-column-push(@columns) {
@media (min-width: @screen-lg-min) {
left: percentage((@columns / @grid-columns));
}
}
.make-lg-column-pull(@columns) {
@media (min-width: @screen-lg-min) {
right: percentage((@columns / @grid-columns));
}
}

View File

@ -0,0 +1,21 @@
// CSS image replacement
//
// Heads up! v3 launched with with only `.hide-text()`, but per our pattern for
// mixins being reused as classes with the same name, this doesn't hold up. As
// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.
//
// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
// Deprecated as of v3.0.1 (will be removed in v4)
.hide-text() {
font: ~"0/0" a;
color: transparent;
text-shadow: none;
background-color: transparent;
border: 0;
}
// New mixin to use as of v3.0.1
.text-hide() {
.hide-text();
}

View File

@ -0,0 +1,33 @@
// Image Mixins
// - Responsive image
// - Retina image
// Responsive image
//
// Keep images from scaling beyond the width of their parents.
.img-responsive(@display: block) {
display: @display;
max-width: 100%; // Part 1: Set a maximum relative to the parent
height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
}
// Retina image
//
// Short retina mixin for setting background-image and -size. Note that the
// spelling of `min--moz-device-pixel-ratio` is intentional.
.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {
background-image: url("@{file-1x}");
@media
only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and ( min--moz-device-pixel-ratio: 2),
only screen and ( -o-min-device-pixel-ratio: 2/1),
only screen and ( min-device-pixel-ratio: 2),
only screen and ( min-resolution: 192dpi),
only screen and ( min-resolution: 2dppx) {
background-image: url("@{file-2x}");
background-size: @width-1x @height-1x;
}
}

View File

@ -0,0 +1,12 @@
// Labels
.label-variant(@color) {
background-color: @color;
&[href] {
&:hover,
&:focus {
background-color: darken(@color, 10%);
}
}
}

View File

@ -0,0 +1,29 @@
// List Groups
.list-group-item-variant(@state; @background; @color) {
.list-group-item-@{state} {
color: @color;
background-color: @background;
a& {
color: @color;
.list-group-item-heading {
color: inherit;
}
&:hover,
&:focus {
color: @color;
background-color: darken(@background, 5%);
}
&.active,
&.active:hover,
&.active:focus {
color: #fff;
background-color: @color;
border-color: @color;
}
}
}
}

View File

@ -0,0 +1,10 @@
// Horizontal dividers
//
// Dividers (basically an hr) within dropdowns and nav lists
.nav-divider(@color: #e5e5e5) {
height: 1px;
margin: ((@line-height-computed / 2) - 1) 0;
overflow: hidden;
background-color: @color;
}

View File

@ -0,0 +1,9 @@
// Navbar vertical align
//
// Vertically center elements in the navbar.
// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
.navbar-vertical-align(@element-height) {
margin-top: ((@navbar-height - @element-height) / 2);
margin-bottom: ((@navbar-height - @element-height) / 2);
}

View File

@ -0,0 +1,8 @@
// Opacity
.opacity(@opacity) {
opacity: @opacity;
// IE8 filter
@opacity-ie: (@opacity * 100);
filter: ~"alpha(opacity=@{opacity-ie})";
}

View File

@ -0,0 +1,23 @@
// Pagination
.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) {
> li {
> a,
> span {
padding: @padding-vertical @padding-horizontal;
font-size: @font-size;
}
&:first-child {
> a,
> span {
.border-left-radius(@border-radius);
}
}
&:last-child {
> a,
> span {
.border-right-radius(@border-radius);
}
}
}
}

View File

@ -0,0 +1,24 @@
// Panels
.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {
border-color: @border;
& > .panel-heading {
color: @heading-text-color;
background-color: @heading-bg-color;
border-color: @heading-border;
+ .panel-collapse > .panel-body {
border-top-color: @border;
}
.badge {
color: @heading-bg-color;
background-color: @heading-text-color;
}
}
& > .panel-footer {
+ .panel-collapse > .panel-body {
border-bottom-color: @border;
}
}
}

View File

@ -0,0 +1,10 @@
// Progress bars
.progress-bar-variant(@color) {
background-color: @color;
// Deprecated parent class requirement as of v3.2.0
.progress-striped & {
#gradient > .striped();
}
}

View File

@ -0,0 +1,8 @@
// Reset filters for IE
//
// When you need to remove a gradient background, do not forget to use this to reset
// the IE filter for IE9 and below.
.reset-filter() {
filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
}

View File

@ -0,0 +1,6 @@
// Resize anything
.resizable(@direction) {
resize: @direction; // Options: horizontal, vertical, both
overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible`
}

View File

@ -0,0 +1,15 @@
// Responsive utilities
//
// More easily include all the states for responsive-utilities.less.
.responsive-visibility() {
display: block !important;
table& { display: table; }
tr& { display: table-row !important; }
th&,
td& { display: table-cell !important; }
}
.responsive-invisibility() {
display: none !important;
}

View File

@ -0,0 +1,10 @@
// Sizing shortcuts
.size(@width; @height) {
width: @width;
height: @height;
}
.square(@size) {
.size(@size; @size);
}

View File

@ -0,0 +1,9 @@
// WebKit-style focus
.tab-focus() {
// Default
outline: thin dotted;
// WebKit
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}

View File

@ -0,0 +1,28 @@
// Tables
.table-row-variant(@state; @background) {
// Exact selectors below required to override `.table-striped` and prevent
// inheritance to nested tables.
.table > thead > tr,
.table > tbody > tr,
.table > tfoot > tr {
> td.@{state},
> th.@{state},
&.@{state} > td,
&.@{state} > th {
background-color: @background;
}
}
// Hover states for `.table-hover`
// Note: this is not available for cells or rows within `thead` or `tfoot`.
.table-hover > tbody > tr {
> td.@{state}:hover,
> th.@{state}:hover,
&.@{state}:hover > td,
&:hover > .@{state},
&.@{state}:hover > th {
background-color: darken(@background, 5%);
}
}
}

View File

@ -0,0 +1,8 @@
// Typography
.text-emphasis-variant(@color) {
color: @color;
a&:hover {
color: darken(@color, 10%);
}
}

View File

@ -0,0 +1,8 @@
// Text overflow
// Requires inline-block or block for proper styling
.text-overflow() {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

View File

@ -0,0 +1,227 @@
// Vendor Prefixes
//
// All vendor mixins are deprecated as of v3.2.0 due to the introduction of
// Autoprefixer in our Gruntfile. They will be removed in v4.
// - Animations
// - Backface visibility
// - Box shadow
// - Box sizing
// - Content columns
// - Hyphens
// - Placeholder text
// - Transformations
// - Transitions
// - User Select
// Animations
.animation(@animation) {
-webkit-animation: @animation;
-o-animation: @animation;
animation: @animation;
}
.animation-name(@name) {
-webkit-animation-name: @name;
animation-name: @name;
}
.animation-duration(@duration) {
-webkit-animation-duration: @duration;
animation-duration: @duration;
}
.animation-timing-function(@timing-function) {
-webkit-animation-timing-function: @timing-function;
animation-timing-function: @timing-function;
}
.animation-delay(@delay) {
-webkit-animation-delay: @delay;
animation-delay: @delay;
}
.animation-iteration-count(@iteration-count) {
-webkit-animation-iteration-count: @iteration-count;
animation-iteration-count: @iteration-count;
}
.animation-direction(@direction) {
-webkit-animation-direction: @direction;
animation-direction: @direction;
}
.animation-fill-mode(@fill-mode) {
-webkit-animation-fill-mode: @fill-mode;
animation-fill-mode: @fill-mode;
}
// Backface visibility
// Prevent browsers from flickering when using CSS 3D transforms.
// Default value is `visible`, but can be changed to `hidden`
.backface-visibility(@visibility){
-webkit-backface-visibility: @visibility;
-moz-backface-visibility: @visibility;
backface-visibility: @visibility;
}
// Drop shadows
//
// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's
// supported browsers that have box shadow capabilities now support it.
.box-shadow(@shadow) {
-webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1
box-shadow: @shadow;
}
// Box sizing
.box-sizing(@boxmodel) {
-webkit-box-sizing: @boxmodel;
-moz-box-sizing: @boxmodel;
box-sizing: @boxmodel;
}
// CSS3 Content Columns
.content-columns(@column-count; @column-gap: @grid-gutter-width) {
-webkit-column-count: @column-count;
-moz-column-count: @column-count;
column-count: @column-count;
-webkit-column-gap: @column-gap;
-moz-column-gap: @column-gap;
column-gap: @column-gap;
}
// Optional hyphenation
.hyphens(@mode: auto) {
word-wrap: break-word;
-webkit-hyphens: @mode;
-moz-hyphens: @mode;
-ms-hyphens: @mode; // IE10+
-o-hyphens: @mode;
hyphens: @mode;
}
// Placeholder text
.placeholder(@color: @input-color-placeholder) {
// Firefox
&::-moz-placeholder {
color: @color;
opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
}
&:-ms-input-placeholder { color: @color; } // Internet Explorer 10+
&::-webkit-input-placeholder { color: @color; } // Safari and Chrome
}
// Transformations
.scale(@ratio) {
-webkit-transform: scale(@ratio);
-ms-transform: scale(@ratio); // IE9 only
-o-transform: scale(@ratio);
transform: scale(@ratio);
}
.scale(@ratioX; @ratioY) {
-webkit-transform: scale(@ratioX, @ratioY);
-ms-transform: scale(@ratioX, @ratioY); // IE9 only
-o-transform: scale(@ratioX, @ratioY);
transform: scale(@ratioX, @ratioY);
}
.scaleX(@ratio) {
-webkit-transform: scaleX(@ratio);
-ms-transform: scaleX(@ratio); // IE9 only
-o-transform: scaleX(@ratio);
transform: scaleX(@ratio);
}
.scaleY(@ratio) {
-webkit-transform: scaleY(@ratio);
-ms-transform: scaleY(@ratio); // IE9 only
-o-transform: scaleY(@ratio);
transform: scaleY(@ratio);
}
.skew(@x; @y) {
-webkit-transform: skewX(@x) skewY(@y);
-ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+
-o-transform: skewX(@x) skewY(@y);
transform: skewX(@x) skewY(@y);
}
.translate(@x; @y) {
-webkit-transform: translate(@x, @y);
-ms-transform: translate(@x, @y); // IE9 only
-o-transform: translate(@x, @y);
transform: translate(@x, @y);
}
.translate3d(@x; @y; @z) {
-webkit-transform: translate3d(@x, @y, @z);
transform: translate3d(@x, @y, @z);
}
.rotate(@degrees) {
-webkit-transform: rotate(@degrees);
-ms-transform: rotate(@degrees); // IE9 only
-o-transform: rotate(@degrees);
transform: rotate(@degrees);
}
.rotateX(@degrees) {
-webkit-transform: rotateX(@degrees);
-ms-transform: rotateX(@degrees); // IE9 only
-o-transform: rotateX(@degrees);
transform: rotateX(@degrees);
}
.rotateY(@degrees) {
-webkit-transform: rotateY(@degrees);
-ms-transform: rotateY(@degrees); // IE9 only
-o-transform: rotateY(@degrees);
transform: rotateY(@degrees);
}
.perspective(@perspective) {
-webkit-perspective: @perspective;
-moz-perspective: @perspective;
perspective: @perspective;
}
.perspective-origin(@perspective) {
-webkit-perspective-origin: @perspective;
-moz-perspective-origin: @perspective;
perspective-origin: @perspective;
}
.transform-origin(@origin) {
-webkit-transform-origin: @origin;
-moz-transform-origin: @origin;
-ms-transform-origin: @origin; // IE9 only
transform-origin: @origin;
}
// Transitions
.transition(@transition) {
-webkit-transition: @transition;
-o-transition: @transition;
transition: @transition;
}
.transition-property(@transition-property) {
-webkit-transition-property: @transition-property;
transition-property: @transition-property;
}
.transition-delay(@transition-delay) {
-webkit-transition-delay: @transition-delay;
transition-delay: @transition-delay;
}
.transition-duration(@transition-duration) {
-webkit-transition-duration: @transition-duration;
transition-duration: @transition-duration;
}
.transition-timing-function(@timing-function) {
-webkit-transition-timing-function: @timing-function;
transition-timing-function: @timing-function;
}
.transition-transform(@transition) {
-webkit-transition: -webkit-transform @transition;
-moz-transition: -moz-transform @transition;
-o-transition: -o-transform @transition;
transition: transform @transition;
}
// User select
// For selecting text on the page
.user-select(@select) {
-webkit-user-select: @select;
-moz-user-select: @select;
-ms-user-select: @select; // IE10+
user-select: @select;
}

150
doc/bootstrap/modals.less Normal file
View File

@ -0,0 +1,150 @@
//
// Modals
// --------------------------------------------------
// .modal-open - body class for killing the scroll
// .modal - container to scroll within
// .modal-dialog - positioning shell for the actual modal
// .modal-content - actual modal w/ bg and corners and shit
// Kill the scroll on the body
.modal-open {
overflow: hidden;
}
// Container that the modal scrolls within
.modal {
display: none;
overflow: hidden;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: @zindex-modal;
-webkit-overflow-scrolling: touch;
// Prevent Chrome on Windows from adding a focus outline. For details, see
// https://github.com/twbs/bootstrap/pull/10951.
outline: 0;
// When fading in the modal, animate it to slide down
&.fade .modal-dialog {
.translate(0, -25%);
.transition-transform(~"0.3s ease-out");
}
&.in .modal-dialog { .translate(0, 0) }
}
.modal-open .modal {
overflow-x: hidden;
overflow-y: auto;
}
// Shell div to position the modal with bottom padding
.modal-dialog {
position: relative;
width: auto;
margin: 10px;
}
// Actual modal
.modal-content {
position: relative;
background-color: @modal-content-bg;
border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)
border: 1px solid @modal-content-border-color;
border-radius: @border-radius-large;
.box-shadow(0 3px 9px rgba(0,0,0,.5));
background-clip: padding-box;
// Remove focus outline from opened modal
outline: 0;
}
// Modal background
.modal-backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: @zindex-modal-background;
background-color: @modal-backdrop-bg;
// Fade for backdrop
&.fade { .opacity(0); }
&.in { .opacity(@modal-backdrop-opacity); }
}
// Modal header
// Top section of the modal w/ title and dismiss
.modal-header {
padding: @modal-title-padding;
border-bottom: 1px solid @modal-header-border-color;
min-height: (@modal-title-padding + @modal-title-line-height);
}
// Close icon
.modal-header .close {
margin-top: -2px;
}
// Title text within header
.modal-title {
margin: 0;
line-height: @modal-title-line-height;
}
// Modal body
// Where all modal content resides (sibling of .modal-header and .modal-footer)
.modal-body {
position: relative;
padding: @modal-inner-padding;
}
// Footer (for actions)
.modal-footer {
padding: @modal-inner-padding;
text-align: right; // right align buttons
border-top: 1px solid @modal-footer-border-color;
&:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons
// Properly space out buttons
.btn + .btn {
margin-left: 5px;
margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
}
// but override that for button groups
.btn-group .btn + .btn {
margin-left: -1px;
}
// and override it for block buttons as well
.btn-block + .btn-block {
margin-left: 0;
}
}
// Measure scrollbar width for padding body during modal show/hide
.modal-scrollbar-measure {
position: absolute;
top: -9999px;
width: 50px;
height: 50px;
overflow: scroll;
}
// Scale up the modal
@media (min-width: @screen-sm-min) {
// Automatically set modal's width for larger viewports
.modal-dialog {
width: @modal-md;
margin: 30px auto;
}
.modal-content {
.box-shadow(0 5px 15px rgba(0,0,0,.5));
}
// Modal sizes
.modal-sm { width: @modal-sm; }
}
@media (min-width: @screen-md-min) {
.modal-lg { width: @modal-lg; }
}

660
doc/bootstrap/navbar.less Normal file
View File

@ -0,0 +1,660 @@
//
// Navbars
// --------------------------------------------------
// Wrapper and base class
//
// Provide a static navbar from which we expand to create full-width, fixed, and
// other navbar variations.
.navbar {
position: relative;
min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)
margin-bottom: @navbar-margin-bottom;
border: 1px solid transparent;
// Prevent floats from breaking the navbar
&:extend(.clearfix all);
@media (min-width: @grid-float-breakpoint) {
border-radius: @navbar-border-radius;
}
}
// Navbar heading
//
// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy
// styling of responsive aspects.
.navbar-header {
&:extend(.clearfix all);
@media (min-width: @grid-float-breakpoint) {
float: left;
}
}
// Navbar collapse (body)
//
// Group your navbar content into this for easy collapsing and expanding across
// various device sizes. By default, this content is collapsed when <768px, but
// will expand past that for a horizontal display.
//
// To start (on mobile devices) the navbar links, forms, and buttons are stacked
// vertically and include a `max-height` to overflow in case you have too much
// content for the user's viewport.
.navbar-collapse {
overflow-x: visible;
padding-right: @navbar-padding-horizontal;
padding-left: @navbar-padding-horizontal;
border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
&:extend(.clearfix all);
-webkit-overflow-scrolling: touch;
&.in {
overflow-y: auto;
}
@media (min-width: @grid-float-breakpoint) {
width: auto;
border-top: 0;
box-shadow: none;
&.collapse {
display: block !important;
height: auto !important;
padding-bottom: 0; // Override default setting
overflow: visible !important;
}
&.in {
overflow-y: visible;
}
// Undo the collapse side padding for navbars with containers to ensure
// alignment of right-aligned contents.
.navbar-fixed-top &,
.navbar-static-top &,
.navbar-fixed-bottom & {
padding-left: 0;
padding-right: 0;
}
}
}
.navbar-fixed-top,
.navbar-fixed-bottom {
.navbar-collapse {
max-height: @navbar-collapse-max-height;
@media (max-device-width: @screen-xs-min) and (orientation: landscape) {
max-height: 200px;
}
}
}
// Both navbar header and collapse
//
// When a container is present, change the behavior of the header and collapse.
.tb-container,
.container-fluid {
> .navbar-header,
> .navbar-collapse {
margin-right: -@navbar-padding-horizontal;
margin-left: -@navbar-padding-horizontal;
@media (min-width: @grid-float-breakpoint) {
margin-right: 0;
margin-left: 0;
}
}
}
//
// Navbar alignment options
//
// Display the navbar across the entirety of the page or fixed it to the top or
// bottom of the page.
// Static top (unfixed, but 100% wide) navbar
.navbar-static-top {
z-index: @zindex-navbar;
border-width: 0 0 1px;
@media (min-width: @grid-float-breakpoint) {
border-radius: 0;
}
}
// Fix the top/bottom navbars when screen real estate supports it
.navbar-fixed-top,
.navbar-fixed-bottom {
position: fixed;
right: 0;
left: 0;
z-index: @zindex-navbar-fixed;
// Undo the rounded corners
@media (min-width: @grid-float-breakpoint) {
border-radius: 0;
}
}
.navbar-fixed-top {
top: 0;
border-width: 0 0 1px;
}
.navbar-fixed-bottom {
bottom: 0;
margin-bottom: 0; // override .navbar defaults
border-width: 1px 0 0;
}
// Brand/project name
.navbar-brand {
float: left;
padding: @navbar-padding-vertical @navbar-padding-horizontal;
font-size: @font-size-large;
line-height: @line-height-computed;
height: @navbar-height;
&:hover,
&:focus {
text-decoration: none;
}
> img {
display: block;
}
@media (min-width: @grid-float-breakpoint) {
.navbar > .tb-container &,
.navbar > .container-fluid & {
margin-left: -@navbar-padding-horizontal;
}
}
}
// Navbar toggle
//
// Custom button for toggling the `.navbar-collapse`, powered by the collapse
// JavaScript plugin.
.navbar-toggle {
position: relative;
float: right;
margin-right: @navbar-padding-horizontal;
padding: 9px 10px;
.navbar-vertical-align(34px);
background-color: transparent;
background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
border: 1px solid transparent;
border-radius: @border-radius-base;
// We remove the `outline` here, but later compensate by attaching `:hover`
// styles to `:focus`.
&:focus {
outline: 0;
}
// Bars
.icon-bar {
display: block;
width: 22px;
height: 2px;
border-radius: 1px;
}
.icon-bar + .icon-bar {
margin-top: 4px;
}
@media (min-width: @grid-float-breakpoint) {
display: none;
}
}
// Navbar nav links
//
// Builds on top of the `.nav` components with its own modifier class to make
// the nav the full height of the horizontal nav (above 768px).
.navbar-nav {
margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal;
> li > a {
padding-top: 10px;
padding-bottom: 10px;
line-height: @line-height-computed;
}
@media (max-width: @grid-float-breakpoint-max) {
// Dropdowns get custom display when collapsed
.open .dropdown-menu {
position: static;
float: none;
width: auto;
margin-top: 0;
background-color: transparent;
border: 0;
box-shadow: none;
> li > a,
.dropdown-header {
padding: 5px 15px 5px 25px;
}
> li > a {
line-height: @line-height-computed;
&:hover,
&:focus {
background-image: none;
}
}
}
}
// Uncollapse the nav
@media (min-width: @grid-float-breakpoint) {
float: left;
margin: 0;
> li {
float: left;
> a {
padding-top: @navbar-padding-vertical;
padding-bottom: @navbar-padding-vertical;
}
}
}
}
// Navbar form
//
// Extension of the `.form-inline` with some extra flavor for optimum display in
// our navbars.
.navbar-form {
margin-left: -@navbar-padding-horizontal;
margin-right: -@navbar-padding-horizontal;
padding: 10px @navbar-padding-horizontal;
border-top: 1px solid transparent;
border-bottom: 1px solid transparent;
@shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);
.box-shadow(@shadow);
// Mixin behavior for optimum display
.form-inline();
.form-group {
@media (max-width: @grid-float-breakpoint-max) {
margin-bottom: 5px;
&:last-child {
margin-bottom: 0;
}
}
}
// Vertically center in expanded, horizontal navbar
.navbar-vertical-align(@input-height-base);
// Undo 100% width for pull classes
@media (min-width: @grid-float-breakpoint) {
width: auto;
border: 0;
margin-left: 0;
margin-right: 0;
padding-top: 0;
padding-bottom: 0;
.box-shadow(none);
}
}
// Dropdown menus
// Menu position and menu carets
.navbar-nav > li > .dropdown-menu {
margin-top: 0;
.border-top-radius(0);
}
// Menu position and menu caret support for dropups via extra dropup class
.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
margin-bottom: 0;
.border-top-radius(@navbar-border-radius);
.border-bottom-radius(0);
}
// Buttons in navbars
//
// Vertically center a button within a navbar (when *not* in a form).
.navbar-btn {
.navbar-vertical-align(@input-height-base);
&.btn-sm {
.navbar-vertical-align(@input-height-small);
}
&.btn-xs {
.navbar-vertical-align(22);
}
}
// Text in navbars
//
// Add a class to make any element properly align itself vertically within the navbars.
.navbar-text {
.navbar-vertical-align(@line-height-computed);
@media (min-width: @grid-float-breakpoint) {
float: left;
margin-left: @navbar-padding-horizontal;
margin-right: @navbar-padding-horizontal;
}
}
// Component alignment
//
// Repurpose the pull utilities as their own navbar utilities to avoid specificity
// issues with parents and chaining. Only do this when the navbar is uncollapsed
// though so that navbar contents properly stack and align in mobile.
//
// Declared after the navbar components to ensure more specificity on the margins.
@media (min-width: @grid-float-breakpoint) {
.navbar-left { .pull-left(); }
.navbar-right {
.pull-right();
margin-right: -@navbar-padding-horizontal;
~ .navbar-right {
margin-right: 0;
}
}
}
// Alternate navbars
// --------------------------------------------------
// Default navbar
.navbar-default {
background-color: @navbar-default-bg;
border-color: @navbar-default-border;
.navbar-brand {
color: @navbar-default-brand-color;
&:hover,
&:focus {
color: @navbar-default-brand-hover-color;
background-color: @navbar-default-brand-hover-bg;
}
}
.navbar-text {
color: @navbar-default-color;
}
.navbar-nav {
> li > a {
color: @navbar-default-link-color;
&:hover,
&:focus {
color: @navbar-default-link-hover-color;
background-color: @navbar-default-link-hover-bg;
}
}
> .active > a {
&,
&:hover,
&:focus {
color: @navbar-default-link-active-color;
background-color: @navbar-default-link-active-bg;
}
}
> .disabled > a {
&,
&:hover,
&:focus {
color: @navbar-default-link-disabled-color;
background-color: @navbar-default-link-disabled-bg;
}
}
}
.navbar-toggle {
border-color: @navbar-default-toggle-border-color;
&:hover,
&:focus {
background-color: @navbar-default-toggle-hover-bg;
}
.icon-bar {
background-color: @navbar-default-toggle-icon-bar-bg;
}
}
.navbar-collapse,
.navbar-form {
border-color: @navbar-default-border;
}
// Dropdown menu items
.navbar-nav {
// Remove background color from open dropdown
> .open > a {
&,
&:hover,
&:focus {
background-color: @navbar-default-link-active-bg;
color: @navbar-default-link-active-color;
}
}
@media (max-width: @grid-float-breakpoint-max) {
// Dropdowns get custom display when collapsed
.open .dropdown-menu {
> li > a {
color: @navbar-default-link-color;
&:hover,
&:focus {
color: @navbar-default-link-hover-color;
background-color: @navbar-default-link-hover-bg;
}
}
> .active > a {
&,
&:hover,
&:focus {
color: @navbar-default-link-active-color;
background-color: @navbar-default-link-active-bg;
}
}
> .disabled > a {
&,
&:hover,
&:focus {
color: @navbar-default-link-disabled-color;
background-color: @navbar-default-link-disabled-bg;
}
}
}
}
}
// Links in navbars
//
// Add a class to ensure links outside the navbar nav are colored correctly.
.navbar-link {
color: @navbar-default-link-color;
&:hover {
color: @navbar-default-link-hover-color;
}
}
.btn-link {
color: @navbar-default-link-color;
&:hover,
&:focus {
color: @navbar-default-link-hover-color;
}
&[disabled],
fieldset[disabled] & {
&:hover,
&:focus {
color: @navbar-default-link-disabled-color;
}
}
}
}
// Inverse navbar
.navbar-inverse {
background-color: @navbar-inverse-bg;
border-color: @navbar-inverse-border;
.navbar-brand {
color: @navbar-inverse-brand-color;
&:hover,
&:focus {
color: @navbar-inverse-brand-hover-color;
background-color: @navbar-inverse-brand-hover-bg;
}
}
.navbar-text {
color: @navbar-inverse-color;
}
.navbar-nav {
> li > a {
color: @navbar-inverse-link-color;
&:hover,
&:focus {
color: @navbar-inverse-link-hover-color;
background-color: @navbar-inverse-link-hover-bg;
}
}
> .active > a {
&,
&:hover,
&:focus {
color: @navbar-inverse-link-active-color;
background-color: @navbar-inverse-link-active-bg;
}
}
> .disabled > a {
&,
&:hover,
&:focus {
color: @navbar-inverse-link-disabled-color;
background-color: @navbar-inverse-link-disabled-bg;
}
}
}
// Darken the responsive nav toggle
.navbar-toggle {
border-color: @navbar-inverse-toggle-border-color;
&:hover,
&:focus {
background-color: @navbar-inverse-toggle-hover-bg;
}
.icon-bar {
background-color: @navbar-inverse-toggle-icon-bar-bg;
}
}
.navbar-collapse,
.navbar-form {
border-color: darken(@navbar-inverse-bg, 7%);
}
// Dropdowns
.navbar-nav {
> .open > a {
&,
&:hover,
&:focus {
background-color: @navbar-inverse-link-active-bg;
color: @navbar-inverse-link-active-color;
}
}
@media (max-width: @grid-float-breakpoint-max) {
// Dropdowns get custom display
.open .dropdown-menu {
> .dropdown-header {
border-color: @navbar-inverse-border;
}
.divider {
background-color: @navbar-inverse-border;
}
> li > a {
color: @navbar-inverse-link-color;
&:hover,
&:focus {
color: @navbar-inverse-link-hover-color;
background-color: @navbar-inverse-link-hover-bg;
}
}
> .active > a {
&,
&:hover,
&:focus {
color: @navbar-inverse-link-active-color;
background-color: @navbar-inverse-link-active-bg;
}
}
> .disabled > a {
&,
&:hover,
&:focus {
color: @navbar-inverse-link-disabled-color;
background-color: @navbar-inverse-link-disabled-bg;
}
}
}
}
}
.navbar-link {
color: @navbar-inverse-link-color;
&:hover {
color: @navbar-inverse-link-hover-color;
}
}
.btn-link {
color: @navbar-inverse-link-color;
&:hover,
&:focus {
color: @navbar-inverse-link-hover-color;
}
&[disabled],
fieldset[disabled] & {
&:hover,
&:focus {
color: @navbar-inverse-link-disabled-color;
}
}
}
}

242
doc/bootstrap/navs.less Normal file
View File

@ -0,0 +1,242 @@
//
// Navs
// --------------------------------------------------
// Base class
// --------------------------------------------------
.nav {
margin-bottom: 0;
padding-left: 0; // Override default ul/ol
list-style: none;
&:extend(.clearfix all);
> li {
position: relative;
display: block;
> a {
position: relative;
display: block;
padding: @nav-link-padding;
&:hover,
&:focus {
text-decoration: none;
background-color: @nav-link-hover-bg;
}
}
// Disabled state sets text to gray and nukes hover/tab effects
&.disabled > a {
color: @nav-disabled-link-color;
&:hover,
&:focus {
color: @nav-disabled-link-hover-color;
text-decoration: none;
background-color: transparent;
cursor: @cursor-disabled;
}
}
}
// Open dropdowns
.open > a {
&,
&:hover,
&:focus {
background-color: @nav-link-hover-bg;
border-color: @link-color;
}
}
// Nav dividers (deprecated with v3.0.1)
//
// This should have been removed in v3 with the dropping of `.nav-list`, but
// we missed it. We don't currently support this anywhere, but in the interest
// of maintaining backward compatibility in case you use it, it's deprecated.
.nav-divider {
.nav-divider();
}
// Prevent IE8 from misplacing imgs
//
// See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
> li > a > img {
max-width: none;
}
}
// Tabs
// -------------------------
// Give the tabs something to sit on
.nav-tabs {
border-bottom: 1px solid @nav-tabs-border-color;
> li {
float: left;
// Make the list-items overlay the bottom border
margin-bottom: -1px;
// Actual tabs (as links)
> a {
margin-right: 2px;
line-height: @line-height-base;
border: 1px solid transparent;
border-radius: @border-radius-base @border-radius-base 0 0;
&:hover {
border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;
}
}
// Active state, and its :hover to override normal :hover
&.active > a {
&,
&:hover,
&:focus {
color: @nav-tabs-active-link-hover-color;
background-color: @nav-tabs-active-link-hover-bg;
border: 1px solid @nav-tabs-active-link-hover-border-color;
border-bottom-color: transparent;
cursor: default;
}
}
}
// pulling this in mainly for less shorthand
&.nav-justified {
.nav-justified();
.nav-tabs-justified();
}
}
// Pills
// -------------------------
.nav-pills {
> li {
float: left;
// Links rendered as pills
> a {
border-radius: @nav-pills-border-radius;
}
+ li {
margin-left: 2px;
}
// Active state
&.active > a {
&,
&:hover,
&:focus {
color: @nav-pills-active-link-hover-color;
background-color: @nav-pills-active-link-hover-bg;
}
}
}
}
// Stacked pills
.nav-stacked {
> li {
float: none;
+ li {
margin-top: 2px;
margin-left: 0; // no need for this gap between nav items
}
}
}
// Nav variations
// --------------------------------------------------
// Justified nav links
// -------------------------
.nav-justified {
width: 100%;
> li {
float: none;
> a {
text-align: center;
margin-bottom: 5px;
}
}
> .dropdown .dropdown-menu {
top: auto;
left: auto;
}
@media (min-width: @screen-sm-min) {
> li {
display: table-cell;
width: 1%;
> a {
margin-bottom: 0;
}
}
}
}
// Move borders to anchors instead of bottom of list
//
// Mixin for adding on top the shared `.nav-justified` styles for our tabs
.nav-tabs-justified {
border-bottom: 0;
> li > a {
// Override margin from .nav-tabs
margin-right: 0;
border-radius: @border-radius-base;
}
> .active > a,
> .active > a:hover,
> .active > a:focus {
border: 1px solid @nav-tabs-justified-link-border-color;
}
@media (min-width: @screen-sm-min) {
> li > a {
border-bottom: 1px solid @nav-tabs-justified-link-border-color;
border-radius: @border-radius-base @border-radius-base 0 0;
}
> .active > a,
> .active > a:hover,
> .active > a:focus {
border-bottom-color: @nav-tabs-justified-active-link-border-color;
}
}
}
// Tabbable tabs
// -------------------------
// Hide tabbable panes to start, show them when `.active`
.tab-content {
> .tab-pane {
display: none;
}
> .active {
display: block;
}
}
// Dropdowns
// -------------------------
// Specific dropdowns
.nav-tabs .dropdown-menu {
// make dropdown border overlap tab border
margin-top: -1px;
// Remove the top rounded corners here since there is a hard edge above the menu
.border-top-radius(0);
}

427
doc/bootstrap/normalize.less vendored Normal file
View File

@ -0,0 +1,427 @@
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
//
// 1. Set default font family to sans-serif.
// 2. Prevent iOS text size adjust after orientation change, without disabling
// user zoom.
//
html {
font-family: sans-serif; // 1
-ms-text-size-adjust: 100%; // 2
-webkit-text-size-adjust: 100%; // 2
}
//
// Remove default margin.
//
body {
margin: 0;
}
// HTML5 display definitions
// ==========================================================================
//
// Correct `block` display not defined for any HTML5 element in IE 8/9.
// Correct `block` display not defined for `details` or `summary` in IE 10/11
// and Firefox.
// Correct `block` display not defined for `main` in IE 11.
//
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block;
}
//
// 1. Correct `inline-block` display not defined in IE 8/9.
// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
//
audio,
canvas,
progress,
video {
display: inline-block; // 1
vertical-align: baseline; // 2
}
//
// Prevent modern browsers from displaying `audio` without controls.
// Remove excess height in iOS 5 devices.
//
audio:not([controls]) {
display: none;
height: 0;
}
//
// Address `[hidden]` styling not present in IE 8/9/10.
// Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
//
[hidden],
template {
display: none;
}
// Links
// ==========================================================================
//
// Remove the gray background color from active links in IE 10.
//
a {
background-color: transparent;
}
//
// Improve readability when focused and also mouse hovered in all browsers.
//
a:active,
a:hover {
outline: 0;
}
// Text-level semantics
// ==========================================================================
//
// Address styling not present in IE 8/9/10/11, Safari, and Chrome.
//
abbr[title] {
border-bottom: 1px dotted;
}
//
// Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
//
b,
strong {
font-weight: bold;
}
//
// Address styling not present in Safari and Chrome.
//
dfn {
font-style: italic;
}
//
// Address variable `h1` font-size and margin within `section` and `article`
// contexts in Firefox 4+, Safari, and Chrome.
//
h1 {
font-size: 2em;
margin: 0.67em 0;
}
//
// Address styling not present in IE 8/9.
//
mark {
background: #ff0;
color: #000;
}
//
// Address inconsistent and variable font size in all browsers.
//
small {
font-size: 80%;
}
//
// Prevent `sub` and `sup` affecting `line-height` in all browsers.
//
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
// Embedded content
// ==========================================================================
//
// Remove border when inside `a` element in IE 8/9/10.
//
img {
border: 0;
}
//
// Correct overflow not hidden in IE 9/10/11.
//
svg:not(:root) {
overflow: hidden;
}
// Grouping content
// ==========================================================================
//
// Address margin not present in IE 8/9 and Safari.
//
figure {
margin: 1em 40px;
}
//
// Address differences between Firefox and other browsers.
//
hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
//
// Contain overflow in all browsers.
//
pre {
overflow: auto;
}
//
// Address odd `em`-unit font size rendering in all browsers.
//
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
// Forms
// ==========================================================================
//
// Known limitation: by default, Chrome and Safari on OS X allow very limited
// styling of `select`, unless a `border` property is set.
//
//
// 1. Correct color not being inherited.
// Known issue: affects color of disabled elements.
// 2. Correct font properties not being inherited.
// 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
//
button,
input,
optgroup,
select,
textarea {
color: inherit; // 1
font: inherit; // 2
margin: 0; // 3
}
//
// Address `overflow` set to `hidden` in IE 8/9/10/11.
//
button {
overflow: visible;
}
//
// Address inconsistent `text-transform` inheritance for `button` and `select`.
// All other form control elements do not inherit `text-transform` values.
// Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
// Correct `select` style inheritance in Firefox.
//
button,
select {
text-transform: none;
}
//
// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
// and `video` controls.
// 2. Correct inability to style clickable `input` types in iOS.
// 3. Improve usability and consistency of cursor style between image-type
// `input` and others.
//
button,
html input[type="button"], // 1
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; // 2
cursor: pointer; // 3
}
//
// Re-set default cursor for disabled elements.
//
button[disabled],
html input[disabled] {
cursor: default;
}
//
// Remove inner padding and border in Firefox 4+.
//
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
//
// Address Firefox 4+ setting `line-height` on `input` using `!important` in
// the UA stylesheet.
//
input {
line-height: normal;
}
//
// It's recommended that you don't attempt to style these elements.
// Firefox's implementation doesn't respect box-sizing, padding, or width.
//
// 1. Address box sizing set to `content-box` in IE 8/9/10.
// 2. Remove excess padding in IE 8/9/10.
//
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; // 1
padding: 0; // 2
}
//
// Fix the cursor style for Chrome's increment/decrement buttons. For certain
// `font-size` values of the `input`, it causes the cursor style of the
// decrement button to change from `default` to `text`.
//
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto;
}
//
// 1. Address `appearance` set to `searchfield` in Safari and Chrome.
// 2. Address `box-sizing` set to `border-box` in Safari and Chrome
// (include `-moz` to future-proof).
//
input[type="search"] {
-webkit-appearance: textfield; // 1
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; // 2
box-sizing: content-box;
}
//
// Remove inner padding and search cancel button in Safari and Chrome on OS X.
// Safari (but not Chrome) clips the cancel button when the search input has
// padding (and `textfield` appearance).
//
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
//
// Define consistent border, margin, and padding.
//
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
//
// 1. Correct `color` not being inherited in IE 8/9/10/11.
// 2. Remove padding so people aren't caught out if they zero out fieldsets.
//
legend {
border: 0; // 1
padding: 0; // 2
}
//
// Remove default vertical scrollbar in IE 8/9/10/11.
//
textarea {
overflow: auto;
}
//
// Don't inherit the `font-weight` (applied by a rule above).
// NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
//
optgroup {
font-weight: bold;
}
// Tables
// ==========================================================================
//
// Remove most spacing between table cells.
//
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}

54
doc/bootstrap/pager.less Normal file
View File

@ -0,0 +1,54 @@
//
// Pager pagination
// --------------------------------------------------
.pager {
padding-left: 0;
margin: @line-height-computed 0;
list-style: none;
text-align: center;
&:extend(.clearfix all);
li {
display: inline;
> a,
> span {
display: inline-block;
padding: 5px 14px;
background-color: @pager-bg;
border: 1px solid @pager-border;
border-radius: @pager-border-radius;
}
> a:hover,
> a:focus {
text-decoration: none;
background-color: @pager-hover-bg;
}
}
.next {
> a,
> span {
float: right;
}
}
.previous {
> a,
> span {
float: left;
}
}
.disabled {
> a,
> a:hover,
> a:focus,
> span {
color: @pager-disabled-color;
background-color: @pager-bg;
cursor: @cursor-disabled;
}
}
}

View File

@ -0,0 +1,88 @@
//
// Pagination (multiple pages)
// --------------------------------------------------
.pagination {
display: inline-block;
padding-left: 0;
margin: @line-height-computed 0;
border-radius: @border-radius-base;
> li {
display: inline; // Remove list-style and block-level defaults
> a,
> span {
position: relative;
float: left; // Collapse white-space
padding: @padding-base-vertical @padding-base-horizontal;
line-height: @line-height-base;
text-decoration: none;
color: @pagination-color;
background-color: @pagination-bg;
border: 1px solid @pagination-border;
margin-left: -1px;
}
&:first-child {
> a,
> span {
margin-left: 0;
.border-left-radius(@border-radius-base);
}
}
&:last-child {
> a,
> span {
.border-right-radius(@border-radius-base);
}
}
}
> li > a,
> li > span {
&:hover,
&:focus {
color: @pagination-hover-color;
background-color: @pagination-hover-bg;
border-color: @pagination-hover-border;
}
}
> .active > a,
> .active > span {
&,
&:hover,
&:focus {
z-index: 2;
color: @pagination-active-color;
background-color: @pagination-active-bg;
border-color: @pagination-active-border;
cursor: default;
}
}
> .disabled {
> span,
> span:hover,
> span:focus,
> a,
> a:hover,
> a:focus {
color: @pagination-disabled-color;
background-color: @pagination-disabled-bg;
border-color: @pagination-disabled-border;
cursor: @cursor-disabled;
}
}
}
// Sizing
// --------------------------------------------------
// Large
.pagination-lg {
.pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large);
}
// Small
.pagination-sm {
.pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small);
}

265
doc/bootstrap/panels.less Normal file
View File

@ -0,0 +1,265 @@
//
// Panels
// --------------------------------------------------
// Base class
.panel {
margin-bottom: @line-height-computed;
background-color: @panel-bg;
border: 1px solid transparent;
border-radius: @panel-border-radius;
.box-shadow(0 1px 1px rgba(0,0,0,.05));
}
// Panel contents
.panel-body {
padding: @panel-body-padding;
&:extend(.clearfix all);
}
// Optional heading
.panel-heading {
padding: @panel-heading-padding;
border-bottom: 1px solid transparent;
.border-top-radius((@panel-border-radius - 1));
> .dropdown .dropdown-toggle {
color: inherit;
}
}
// Within heading, strip any `h*` tag of its default margins for spacing.
.panel-title {
margin-top: 0;
margin-bottom: 0;
font-size: ceil((@font-size-base * 1.125));
color: inherit;
> a,
> small,
> .small,
> small > a,
> .small > a {
color: inherit;
}
}
// Optional footer (stays gray in every modifier class)
.panel-footer {
padding: @panel-footer-padding;
background-color: @panel-footer-bg;
border-top: 1px solid @panel-inner-border;
.border-bottom-radius((@panel-border-radius - 1));
}
// List groups in panels
//
// By default, space out list group content from panel headings to account for
// any kind of custom content between the two.
.panel {
> .list-group,
> .panel-collapse > .list-group {
margin-bottom: 0;
.list-group-item {
border-width: 1px 0;
border-radius: 0;
}
// Add border top radius for first one
&:first-child {
.list-group-item:first-child {
border-top: 0;
.border-top-radius((@panel-border-radius - 1));
}
}
// Add border bottom radius for last one
&:last-child {
.list-group-item:last-child {
border-bottom: 0;
.border-bottom-radius((@panel-border-radius - 1));
}
}
}
}
// Collapse space between when there's no additional content.
.panel-heading + .list-group {
.list-group-item:first-child {
border-top-width: 0;
}
}
.list-group + .panel-footer {
border-top-width: 0;
}
// Tables in panels
//
// Place a non-bordered `.table` within a panel (not within a `.panel-body`) and
// watch it go full width.
.panel {
> .table,
> .table-responsive > .table,
> .panel-collapse > .table {
margin-bottom: 0;
caption {
padding-left: @panel-body-padding;
padding-right: @panel-body-padding;
}
}
// Add border top radius for first one
> .table:first-child,
> .table-responsive:first-child > .table:first-child {
.border-top-radius((@panel-border-radius - 1));
> thead:first-child,
> tbody:first-child {
> tr:first-child {
border-top-left-radius: (@panel-border-radius - 1);
border-top-right-radius: (@panel-border-radius - 1);
td:first-child,
th:first-child {
border-top-left-radius: (@panel-border-radius - 1);
}
td:last-child,
th:last-child {
border-top-right-radius: (@panel-border-radius - 1);
}
}
}
}
// Add border bottom radius for last one
> .table:last-child,
> .table-responsive:last-child > .table:last-child {
.border-bottom-radius((@panel-border-radius - 1));
> tbody:last-child,
> tfoot:last-child {
> tr:last-child {
border-bottom-left-radius: (@panel-border-radius - 1);
border-bottom-right-radius: (@panel-border-radius - 1);
td:first-child,
th:first-child {
border-bottom-left-radius: (@panel-border-radius - 1);
}
td:last-child,
th:last-child {
border-bottom-right-radius: (@panel-border-radius - 1);
}
}
}
}
> .panel-body + .table,
> .panel-body + .table-responsive,
> .table + .panel-body,
> .table-responsive + .panel-body {
border-top: 1px solid @table-border-color;
}
> .table > tbody:first-child > tr:first-child th,
> .table > tbody:first-child > tr:first-child td {
border-top: 0;
}
> .table-bordered,
> .table-responsive > .table-bordered {
border: 0;
> thead,
> tbody,
> tfoot {
> tr {
> th:first-child,
> td:first-child {
border-left: 0;
}
> th:last-child,
> td:last-child {
border-right: 0;
}
}
}
> thead,
> tbody {
> tr:first-child {
> td,
> th {
border-bottom: 0;
}
}
}
> tbody,
> tfoot {
> tr:last-child {
> td,
> th {
border-bottom: 0;
}
}
}
}
> .table-responsive {
border: 0;
margin-bottom: 0;
}
}
// Collapsable panels (aka, accordion)
//
// Wrap a series of panels in `.panel-group` to turn them into an accordion with
// the help of our collapse JavaScript plugin.
.panel-group {
margin-bottom: @line-height-computed;
// Tighten up margin so it's only between panels
.panel {
margin-bottom: 0;
border-radius: @panel-border-radius;
+ .panel {
margin-top: 5px;
}
}
.panel-heading {
border-bottom: 0;
+ .panel-collapse > .panel-body,
+ .panel-collapse > .list-group {
border-top: 1px solid @panel-inner-border;
}
}
.panel-footer {
border-top: 0;
+ .panel-collapse .panel-body {
border-bottom: 1px solid @panel-inner-border;
}
}
}
// Contextual variations
.panel-default {
.panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border);
}
.panel-primary {
.panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border);
}
.panel-success {
.panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border);
}
.panel-info {
.panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);
}
.panel-warning {
.panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border);
}
.panel-danger {
.panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border);
}

135
doc/bootstrap/popovers.less Normal file
View File

@ -0,0 +1,135 @@
//
// Popovers
// --------------------------------------------------
.popover {
position: absolute;
top: 0;
left: 0;
z-index: @zindex-popover;
display: none;
max-width: @popover-max-width;
padding: 1px;
// Reset font and text properties given new insertion method
font-family: @font-family-base;
font-size: @font-size-base;
font-weight: normal;
line-height: @line-height-base;
text-align: left;
background-color: @popover-bg;
background-clip: padding-box;
border: 1px solid @popover-fallback-border-color;
border: 1px solid @popover-border-color;
border-radius: @border-radius-large;
.box-shadow(0 5px 10px rgba(0,0,0,.2));
// Overrides for proper insertion
white-space: normal;
// Offset the popover to account for the popover arrow
&.top { margin-top: -@popover-arrow-width; }
&.right { margin-left: @popover-arrow-width; }
&.bottom { margin-top: @popover-arrow-width; }
&.left { margin-left: -@popover-arrow-width; }
}
.popover-title {
margin: 0; // reset heading margin
padding: 8px 14px;
font-size: @font-size-base;
background-color: @popover-title-bg;
border-bottom: 1px solid darken(@popover-title-bg, 5%);
border-radius: (@border-radius-large - 1) (@border-radius-large - 1) 0 0;
}
.popover-content {
padding: 9px 14px;
}
// Arrows
//
// .arrow is outer, .arrow:after is inner
.popover > .arrow {
&,
&:after {
position: absolute;
display: block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
}
.popover > .arrow {
border-width: @popover-arrow-outer-width;
}
.popover > .arrow:after {
border-width: @popover-arrow-width;
content: "";
}
.popover {
&.top > .arrow {
left: 50%;
margin-left: -@popover-arrow-outer-width;
border-bottom-width: 0;
border-top-color: @popover-arrow-outer-fallback-color; // IE8 fallback
border-top-color: @popover-arrow-outer-color;
bottom: -@popover-arrow-outer-width;
&:after {
content: " ";
bottom: 1px;
margin-left: -@popover-arrow-width;
border-bottom-width: 0;
border-top-color: @popover-arrow-color;
}
}
&.right > .arrow {
top: 50%;
left: -@popover-arrow-outer-width;
margin-top: -@popover-arrow-outer-width;
border-left-width: 0;
border-right-color: @popover-arrow-outer-fallback-color; // IE8 fallback
border-right-color: @popover-arrow-outer-color;
&:after {
content: " ";
left: 1px;
bottom: -@popover-arrow-width;
border-left-width: 0;
border-right-color: @popover-arrow-color;
}
}
&.bottom > .arrow {
left: 50%;
margin-left: -@popover-arrow-outer-width;
border-top-width: 0;
border-bottom-color: @popover-arrow-outer-fallback-color; // IE8 fallback
border-bottom-color: @popover-arrow-outer-color;
top: -@popover-arrow-outer-width;
&:after {
content: " ";
top: 1px;
margin-left: -@popover-arrow-width;
border-top-width: 0;
border-bottom-color: @popover-arrow-color;
}
}
&.left > .arrow {
top: 50%;
right: -@popover-arrow-outer-width;
margin-top: -@popover-arrow-outer-width;
border-right-width: 0;
border-left-color: @popover-arrow-outer-fallback-color; // IE8 fallback
border-left-color: @popover-arrow-outer-color;
&:after {
content: " ";
right: 1px;
border-right-width: 0;
border-left-color: @popover-arrow-color;
bottom: -@popover-arrow-width;
}
}
}

107
doc/bootstrap/print.less Normal file
View File

@ -0,0 +1,107 @@
/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */
// ==========================================================================
// Print styles.
// Inlined to avoid the additional HTTP request: h5bp.com/r
// ==========================================================================
@media print {
*,
*:before,
*:after {
background: transparent !important;
color: #000 !important; // Black prints faster: h5bp.com/s
box-shadow: none !important;
text-shadow: none !important;
}
a,
a:visited {
text-decoration: underline;
}
a[href]:after {
content: " (" attr(href) ")";
}
abbr[title]:after {
content: " (" attr(title) ")";
}
// Don't show links that are fragment identifiers,
// or use the `javascript:` pseudo protocol
a[href^="#"]:after,
a[href^="javascript:"]:after {
content: "";
}
pre,
blockquote {
border: 1px solid #999;
page-break-inside: avoid;
}
thead {
display: table-header-group; // h5bp.com/t
}
tr,
img {
page-break-inside: avoid;
}
img {
max-width: 100% !important;
}
p,
h2,
h3 {
orphans: 3;
widows: 3;
}
h2,
h3 {
page-break-after: avoid;
}
// Bootstrap specific changes start
//
// Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245
// Once fixed, we can just straight up remove this.
select {
background: #fff !important;
}
// Bootstrap components
.navbar {
display: none;
}
.btn,
.dropup > .btn {
> .caret {
border-top-color: #000 !important;
}
}
.label {
border: 1px solid #000;
}
.table {
border-collapse: collapse !important;
td,
th {
background-color: #fff !important;
}
}
.table-bordered {
th,
td {
border: 1px solid #ddd !important;
}
}
// Bootstrap specific changes end
}

View File

@ -0,0 +1,87 @@
//
// Progress bars
// --------------------------------------------------
// Bar animations
// -------------------------
// WebKit
@-webkit-keyframes progress-bar-stripes {
from { background-position: 40px 0; }
to { background-position: 0 0; }
}
// Spec and IE10+
@keyframes progress-bar-stripes {
from { background-position: 40px 0; }
to { background-position: 0 0; }
}
// Bar itself
// -------------------------
// Outer container
.progress {
overflow: hidden;
height: @line-height-computed;
margin-bottom: @line-height-computed;
background-color: @progress-bg;
border-radius: @progress-border-radius;
.box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
}
// Bar of progress
.progress-bar {
float: left;
width: 0%;
height: 100%;
font-size: @font-size-small;
line-height: @line-height-computed;
color: @progress-bar-color;
text-align: center;
background-color: @progress-bar-bg;
.box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));
.transition(width .6s ease);
}
// Striped bars
//
// `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the
// `.progress-bar-striped` class, which you just add to an existing
// `.progress-bar`.
.progress-striped .progress-bar,
.progress-bar-striped {
#gradient > .striped();
background-size: 40px 40px;
}
// Call animation for the active one
//
// `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the
// `.progress-bar.active` approach.
.progress.active .progress-bar,
.progress-bar.active {
.animation(progress-bar-stripes 2s linear infinite);
}
// Variations
// -------------------------
.progress-bar-success {
.progress-bar-variant(@progress-bar-success-bg);
}
.progress-bar-info {
.progress-bar-variant(@progress-bar-info-bg);
}
.progress-bar-warning {
.progress-bar-variant(@progress-bar-warning-bg);
}
.progress-bar-danger {
.progress-bar-variant(@progress-bar-danger-bg);
}

View File

@ -0,0 +1,35 @@
// Embeds responsive
//
// Credit: Nicolas Gallagher and SUIT CSS.
.embed-responsive {
position: relative;
display: block;
height: 0;
padding: 0;
overflow: hidden;
.embed-responsive-item,
iframe,
embed,
object,
video {
position: absolute;
top: 0;
left: 0;
bottom: 0;
height: 100%;
width: 100%;
border: 0;
}
}
// Modifier class for 16:9 aspect ratio
.embed-responsive-16by9 {
padding-bottom: 56.25%;
}
// Modifier class for 4:3 aspect ratio
.embed-responsive-4by3 {
padding-bottom: 75%;
}

View File

@ -0,0 +1,194 @@
//
// Responsive: Utility classes
// --------------------------------------------------
// IE10 in Windows (Phone) 8
//
// Support for responsive views via media queries is kind of borked in IE10, for
// Surface/desktop in split view and for Windows Phone 8. This particular fix
// must be accompanied by a snippet of JavaScript to sniff the user agent and
// apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at
// our Getting Started page for more information on this bug.
//
// For more information, see the following:
//
// Issue: https://github.com/twbs/bootstrap/issues/10497
// Docs: http://getbootstrap.com/getting-started/#support-ie10-width
// Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/
// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
@-ms-viewport {
width: device-width;
}
// Visibility utilities
// Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0
.visible-xs,
.visible-sm,
.visible-md,
.visible-lg {
.responsive-invisibility();
}
.visible-xs-block,
.visible-xs-inline,
.visible-xs-inline-block,
.visible-sm-block,
.visible-sm-inline,
.visible-sm-inline-block,
.visible-md-block,
.visible-md-inline,
.visible-md-inline-block,
.visible-lg-block,
.visible-lg-inline,
.visible-lg-inline-block {
display: none !important;
}
.visible-xs {
@media (max-width: @screen-xs-max) {
.responsive-visibility();
}
}
.visible-xs-block {
@media (max-width: @screen-xs-max) {
display: block !important;
}
}
.visible-xs-inline {
@media (max-width: @screen-xs-max) {
display: inline !important;
}
}
.visible-xs-inline-block {
@media (max-width: @screen-xs-max) {
display: inline-block !important;
}
}
.visible-sm {
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
.responsive-visibility();
}
}
.visible-sm-block {
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
display: block !important;
}
}
.visible-sm-inline {
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
display: inline !important;
}
}
.visible-sm-inline-block {
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
display: inline-block !important;
}
}
.visible-md {
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
.responsive-visibility();
}
}
.visible-md-block {
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
display: block !important;
}
}
.visible-md-inline {
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
display: inline !important;
}
}
.visible-md-inline-block {
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
display: inline-block !important;
}
}
.visible-lg {
@media (min-width: @screen-lg-min) {
.responsive-visibility();
}
}
.visible-lg-block {
@media (min-width: @screen-lg-min) {
display: block !important;
}
}
.visible-lg-inline {
@media (min-width: @screen-lg-min) {
display: inline !important;
}
}
.visible-lg-inline-block {
@media (min-width: @screen-lg-min) {
display: inline-block !important;
}
}
.hidden-xs {
@media (max-width: @screen-xs-max) {
.responsive-invisibility();
}
}
.hidden-sm {
@media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
.responsive-invisibility();
}
}
.hidden-md {
@media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
.responsive-invisibility();
}
}
.hidden-lg {
@media (min-width: @screen-lg-min) {
.responsive-invisibility();
}
}
// Print utilities
//
// Media queries are placed on the inside to be mixin-friendly.
// Note: Deprecated .visible-print as of v3.2.0
.visible-print {
.responsive-invisibility();
@media print {
.responsive-visibility();
}
}
.visible-print-block {
display: none !important;
@media print {
display: block !important;
}
}
.visible-print-inline {
display: none !important;
@media print {
display: inline !important;
}
}
.visible-print-inline-block {
display: none !important;
@media print {
display: inline-block !important;
}
}
.hidden-print {
@media print {
.responsive-invisibility();
}
}

View File

@ -0,0 +1,162 @@
//
// Scaffolding
// --------------------------------------------------
// Reset the box-sizing
//
// Heads up! This reset may cause conflicts with some third-party widgets.
// For recommendations on resolving such conflicts, see
// http://getbootstrap.com/getting-started/#third-box-sizing
* {
.box-sizing(border-box);
}
*:before,
*:after {
.box-sizing(border-box);
}
// Body reset
html {
font-size: 10px;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
body {
font-family: @font-family-base;
font-size: @font-size-base;
line-height: @line-height-base;
color: @text-color;
background-color: @body-bg;
}
// Reset fonts for relevant elements
input,
button,
select,
textarea {
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
// Links
a {
color: @link-color;
text-decoration: none;
&:hover,
&:focus {
color: @link-hover-color;
text-decoration: @link-hover-decoration;
}
&:focus {
.tab-focus();
}
}
// Figures
//
// We reset this here because previously Normalize had no `figure` margins. This
// ensures we don't break anyone's use of the element.
figure {
margin: 0;
}
// Images
img {
vertical-align: middle;
}
// Responsive images (ensure images don't scale beyond their parents)
.img-responsive {
.img-responsive();
}
// Rounded corners
.img-rounded {
border-radius: @border-radius-large;
}
// Image thumbnails
//
// Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.
.img-thumbnail {
padding: @thumbnail-padding;
line-height: @line-height-base;
background-color: @thumbnail-bg;
border: 1px solid @thumbnail-border;
border-radius: @thumbnail-border-radius;
.transition(all .2s ease-in-out);
// Keep them at most 100% wide
.img-responsive(inline-block);
}
// Perfect circle
.img-circle {
border-radius: 50%; // set radius in percents
}
// Horizontal rules
hr {
margin-top: @line-height-computed;
margin-bottom: @line-height-computed;
border: 0;
border-top: 1px solid @hr-border;
}
// Only display content to screen readers
//
// See: http://a11yproject.com/posts/how-to-hide-content/
.sr-only {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0,0,0,0);
border: 0;
}
// Use in conjunction with .sr-only to only display content when it's focused.
// Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
// Credit: HTML5 Boilerplate
.sr-only-focusable {
&:active,
&:focus {
position: static;
width: auto;
height: auto;
margin: 0;
overflow: visible;
clip: auto;
}
}
// iOS "clickable elements" fix for role="button"
//
// Fixes "clickability" issue (and more generally, the firing of events such as focus as well)
// for traditionally non-focusable elements with role="button"
// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
// Upstream patch for normalize.css submitted: https://github.com/necolas/normalize.css/pull/379 - remove this fix once that is merged
[role="button"] {
cursor: pointer;
}

234
doc/bootstrap/tables.less Normal file
View File

@ -0,0 +1,234 @@
//
// Tables
// --------------------------------------------------
table {
background-color: @table-bg;
}
caption {
padding-top: @table-cell-padding;
padding-bottom: @table-cell-padding;
color: @text-muted;
text-align: left;
}
th {
text-align: left;
}
// Baseline styles
.table {
width: 100%;
max-width: 100%;
margin-bottom: @line-height-computed;
// Cells
> thead,
> tbody,
> tfoot {
> tr {
> th,
> td {
padding: @table-cell-padding;
line-height: @line-height-base;
vertical-align: top;
border-top: 1px solid @table-border-color;
}
}
}
// Bottom align for column headings
> thead > tr > th {
vertical-align: bottom;
border-bottom: 2px solid @table-border-color;
}
// Remove top border from thead by default
> caption + thead,
> colgroup + thead,
> thead:first-child {
> tr:first-child {
> th,
> td {
border-top: 0;
}
}
}
// Account for multiple tbody instances
> tbody + tbody {
border-top: 2px solid @table-border-color;
}
// Nesting
.table {
background-color: @body-bg;
}
}
// Condensed table w/ half padding
.table-condensed {
> thead,
> tbody,
> tfoot {
> tr {
> th,
> td {
padding: @table-condensed-cell-padding;
}
}
}
}
// Bordered version
//
// Add borders all around the table and between all the columns.
.table-bordered {
border: 1px solid @table-border-color;
> thead,
> tbody,
> tfoot {
> tr {
> th,
> td {
border: 1px solid @table-border-color;
}
}
}
> thead > tr {
> th,
> td {
border-bottom-width: 2px;
}
}
}
// Zebra-striping
//
// Default zebra-stripe styles (alternating gray and transparent backgrounds)
.table-striped {
> tbody > tr:nth-of-type(odd) {
background-color: @table-bg-accent;
}
}
// Hover effect
//
// Placed here since it has to come after the potential zebra striping
.table-hover {
> tbody > tr:hover {
background-color: @table-bg-hover;
}
}
// Table cell sizing
//
// Reset default table behavior
table col[class*="col-"] {
position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)
float: none;
display: table-column;
}
table {
td,
th {
&[class*="col-"] {
position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)
float: none;
display: table-cell;
}
}
}
// Table backgrounds
//
// Exact selectors below required to override `.table-striped` and prevent
// inheritance to nested tables.
// Generate the contextual variants
.table-row-variant(active; @table-bg-active);
.table-row-variant(success; @state-success-bg);
.table-row-variant(info; @state-info-bg);
.table-row-variant(warning; @state-warning-bg);
.table-row-variant(danger; @state-danger-bg);
// Responsive tables
//
// Wrap your tables in `.table-responsive` and we'll make them mobile friendly
// by enabling horizontal scrolling. Only applies <768px. Everything above that
// will display normally.
.table-responsive {
overflow-x: auto;
min-height: 0.01%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837)
@media screen and (max-width: @screen-xs-max) {
width: 100%;
margin-bottom: (@line-height-computed * 0.75);
overflow-y: hidden;
-ms-overflow-style: -ms-autohiding-scrollbar;
border: 1px solid @table-border-color;
// Tighten up spacing
> .table {
margin-bottom: 0;
// Ensure the content doesn't wrap
> thead,
> tbody,
> tfoot {
> tr {
> th,
> td {
white-space: nowrap;
}
}
}
}
// Special overrides for the bordered tables
> .table-bordered {
border: 0;
// Nuke the appropriate borders so that the parent can handle them
> thead,
> tbody,
> tfoot {
> tr {
> th:first-child,
> td:first-child {
border-left: 0;
}
> th:last-child,
> td:last-child {
border-right: 0;
}
}
}
// Only nuke the last row's bottom-border in `tbody` and `tfoot` since
// chances are there will be only one `tr` in a `thead` and that would
// remove the border altogether.
> tbody,
> tfoot {
> tr:last-child {
> th,
> td {
border-bottom: 0;
}
}
}
}
}
}

273
doc/bootstrap/theme.less Normal file
View File

@ -0,0 +1,273 @@
//
// Load core variables and mixins
// --------------------------------------------------
@import "variables.less";
@import "mixins.less";
//
// Buttons
// --------------------------------------------------
// Common styles
.btn-default,
.btn-primary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger {
text-shadow: 0 -1px 0 rgba(0,0,0,.2);
@shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);
.box-shadow(@shadow);
// Reset the shadow
&:active,
&.active {
.box-shadow(inset 0 3px 5px rgba(0,0,0,.125));
}
.badge {
text-shadow: none;
}
}
// Mixin for generating new styles
.btn-styles(@btn-color: #555) {
#gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));
.reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620
background-repeat: repeat-x;
border-color: darken(@btn-color, 14%);
&:hover,
&:focus {
background-color: darken(@btn-color, 12%);
background-position: 0 -15px;
}
&:active,
&.active {
background-color: darken(@btn-color, 12%);
border-color: darken(@btn-color, 14%);
}
&.disabled,
&:disabled,
&[disabled] {
background-color: darken(@btn-color, 12%);
background-image: none;
}
}
// Common styles
.btn {
// Remove the gradient for the pressed/active state
&:active,
&.active {
background-image: none;
}
}
// Apply the mixin to the buttons
.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }
.btn-primary { .btn-styles(@btn-primary-bg); }
.btn-success { .btn-styles(@btn-success-bg); }
.btn-info { .btn-styles(@btn-info-bg); }
.btn-warning { .btn-styles(@btn-warning-bg); }
.btn-danger { .btn-styles(@btn-danger-bg); }
//
// Images
// --------------------------------------------------
.thumbnail,
.img-thumbnail {
.box-shadow(0 1px 2px rgba(0,0,0,.075));
}
//
// Dropdowns
// --------------------------------------------------
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
#gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));
background-color: darken(@dropdown-link-hover-bg, 5%);
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
#gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));
background-color: darken(@dropdown-link-active-bg, 5%);
}
//
// Navbar
// --------------------------------------------------
// Default navbar
.navbar-default {
#gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);
.reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered
border-radius: @navbar-border-radius;
@shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);
.box-shadow(@shadow);
.navbar-nav > .open > a,
.navbar-nav > .active > a {
#gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));
.box-shadow(inset 0 3px 9px rgba(0,0,0,.075));
}
}
.navbar-brand,
.navbar-nav > li > a {
text-shadow: 0 1px 0 rgba(255,255,255,.25);
}
// Inverted navbar
.navbar-inverse {
#gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);
.reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257
.navbar-nav > .open > a,
.navbar-nav > .active > a {
#gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));
.box-shadow(inset 0 3px 9px rgba(0,0,0,.25));
}
.navbar-brand,
.navbar-nav > li > a {
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
}
}
// Undo rounded corners in static and fixed navbars
.navbar-static-top,
.navbar-fixed-top,
.navbar-fixed-bottom {
border-radius: 0;
}
// Fix active state of dropdown items in collapsed mode
@media (max-width: @grid-float-breakpoint-max) {
.navbar .navbar-nav .open .dropdown-menu > .active > a {
&,
&:hover,
&:focus {
color: #fff;
#gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));
}
}
}
//
// Alerts
// --------------------------------------------------
// Common styles
.alert {
text-shadow: 0 1px 0 rgba(255,255,255,.2);
@shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);
.box-shadow(@shadow);
}
// Mixin for generating new styles
.alert-styles(@color) {
#gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));
border-color: darken(@color, 15%);
}
// Apply the mixin to the alerts
.alert-success { .alert-styles(@alert-success-bg); }
.alert-info { .alert-styles(@alert-info-bg); }
.alert-warning { .alert-styles(@alert-warning-bg); }
.alert-danger { .alert-styles(@alert-danger-bg); }
//
// Progress bars
// --------------------------------------------------
// Give the progress background some depth
.progress {
#gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)
}
// Mixin for generating new styles
.progress-bar-styles(@color) {
#gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));
}
// Apply the mixin to the progress bars
.progress-bar { .progress-bar-styles(@progress-bar-bg); }
.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }
.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }
.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }
.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }
// Reset the striped class because our mixins don't do multiple gradients and
// the above custom styles override the new `.progress-bar-striped` in v3.2.0.
.progress-bar-striped {
#gradient > .striped();
}
//
// List groups
// --------------------------------------------------
.list-group {
border-radius: @border-radius-base;
.box-shadow(0 1px 2px rgba(0,0,0,.075));
}
.list-group-item.active,
.list-group-item.active:hover,
.list-group-item.active:focus {
text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);
#gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));
border-color: darken(@list-group-active-border, 7.5%);
.badge {
text-shadow: none;
}
}
//
// Panels
// --------------------------------------------------
// Common styles
.panel {
.box-shadow(0 1px 2px rgba(0,0,0,.05));
}
// Mixin for generating new styles
.panel-heading-styles(@color) {
#gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));
}
// Apply the mixin to the panel headings only
.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }
.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }
.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }
.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }
.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }
.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }
//
// Wells
// --------------------------------------------------
.well {
#gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);
border-color: darken(@well-bg, 10%);
@shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);
.box-shadow(@shadow);
}

View File

@ -0,0 +1,36 @@
//
// Thumbnails
// --------------------------------------------------
// Mixin and adjust the regular image class
.thumbnail {
display: block;
padding: @thumbnail-padding;
margin-bottom: @line-height-computed;
line-height: @line-height-base;
background-color: @thumbnail-bg;
border: 1px solid @thumbnail-border;
border-radius: @thumbnail-border-radius;
.transition(border .2s ease-in-out);
> img,
a > img {
&:extend(.img-responsive);
margin-left: auto;
margin-right: auto;
}
// Add a hover state for linked versions only
a&:hover,
a&:focus,
a&.active {
border-color: @link-color;
}
// Image captions
.caption {
padding: @thumbnail-caption-padding;
color: @thumbnail-caption-color;
}
}

102
doc/bootstrap/tooltip.less Normal file
View File

@ -0,0 +1,102 @@
//
// Tooltips
// --------------------------------------------------
// Base class
.tooltip {
position: absolute;
z-index: @zindex-tooltip;
display: block;
// Reset font and text properties given new insertion method
font-family: @font-family-base;
font-size: @font-size-small;
font-weight: normal;
line-height: 1.4;
.opacity(0);
&.in { .opacity(@tooltip-opacity); }
&.top { margin-top: -3px; padding: @tooltip-arrow-width 0; }
&.right { margin-left: 3px; padding: 0 @tooltip-arrow-width; }
&.bottom { margin-top: 3px; padding: @tooltip-arrow-width 0; }
&.left { margin-left: -3px; padding: 0 @tooltip-arrow-width; }
}
// Wrapper for the tooltip content
.tooltip-inner {
max-width: @tooltip-max-width;
padding: 3px 8px;
color: @tooltip-color;
text-align: center;
text-decoration: none;
background-color: @tooltip-bg;
border-radius: @border-radius-base;
}
// Arrows
.tooltip-arrow {
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
// Note: Deprecated .top-left, .top-right, .bottom-left, and .bottom-right as of v3.3.1
.tooltip {
&.top .tooltip-arrow {
bottom: 0;
left: 50%;
margin-left: -@tooltip-arrow-width;
border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
border-top-color: @tooltip-arrow-color;
}
&.top-left .tooltip-arrow {
bottom: 0;
right: @tooltip-arrow-width;
margin-bottom: -@tooltip-arrow-width;
border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
border-top-color: @tooltip-arrow-color;
}
&.top-right .tooltip-arrow {
bottom: 0;
left: @tooltip-arrow-width;
margin-bottom: -@tooltip-arrow-width;
border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
border-top-color: @tooltip-arrow-color;
}
&.right .tooltip-arrow {
top: 50%;
left: 0;
margin-top: -@tooltip-arrow-width;
border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;
border-right-color: @tooltip-arrow-color;
}
&.left .tooltip-arrow {
top: 50%;
right: 0;
margin-top: -@tooltip-arrow-width;
border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;
border-left-color: @tooltip-arrow-color;
}
&.bottom .tooltip-arrow {
top: 0;
left: 50%;
margin-left: -@tooltip-arrow-width;
border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
border-bottom-color: @tooltip-arrow-color;
}
&.bottom-left .tooltip-arrow {
top: 0;
right: @tooltip-arrow-width;
margin-top: -@tooltip-arrow-width;
border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
border-bottom-color: @tooltip-arrow-color;
}
&.bottom-right .tooltip-arrow {
top: 0;
left: @tooltip-arrow-width;
margin-top: -@tooltip-arrow-width;
border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
border-bottom-color: @tooltip-arrow-color;
}
}

302
doc/bootstrap/type.less Normal file
View File

@ -0,0 +1,302 @@
//
// Typography
// --------------------------------------------------
// Headings
// -------------------------
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
font-family: @headings-font-family;
font-weight: @headings-font-weight;
line-height: @headings-line-height;
color: @headings-color;
small,
.small {
font-weight: normal;
line-height: 1;
color: @headings-small-color;
}
}
h1, .h1,
h2, .h2,
h3, .h3 {
margin-top: @line-height-computed;
margin-bottom: (@line-height-computed / 2);
small,
.small {
font-size: 65%;
}
}
h4, .h4,
h5, .h5,
h6, .h6 {
margin-top: (@line-height-computed / 2);
margin-bottom: (@line-height-computed / 2);
small,
.small {
font-size: 75%;
}
}
h1, .h1 { font-size: @font-size-h1; }
h2, .h2 { font-size: @font-size-h2; }
h3, .h3 { font-size: @font-size-h3; }
h4, .h4 { font-size: @font-size-h4; }
h5, .h5 { font-size: @font-size-h5; }
h6, .h6 { font-size: @font-size-h6; }
// Body text
// -------------------------
p {
margin: 0 0 (@line-height-computed / 2);
}
.lead {
margin-bottom: @line-height-computed;
font-size: floor((@font-size-base * 1.15));
font-weight: 300;
line-height: 1.4;
@media (min-width: @screen-sm-min) {
font-size: (@font-size-base * 1.5);
}
}
// Emphasis & misc
// -------------------------
// Ex: (12px small font / 14px base font) * 100% = about 85%
small,
.small {
font-size: floor((100% * @font-size-small / @font-size-base));
}
mark,
.mark {
background-color: @state-warning-bg;
padding: .2em;
}
// Alignment
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-justify { text-align: justify; }
.text-nowrap { white-space: nowrap; }
// Transformation
.text-lowercase { text-transform: lowercase; }
.text-uppercase { text-transform: uppercase; }
.text-capitalize { text-transform: capitalize; }
// Contextual colors
.text-muted {
color: @text-muted;
}
.text-primary {
.text-emphasis-variant(@brand-primary);
}
.text-success {
.text-emphasis-variant(@state-success-text);
}
.text-info {
.text-emphasis-variant(@state-info-text);
}
.text-warning {
.text-emphasis-variant(@state-warning-text);
}
.text-danger {
.text-emphasis-variant(@state-danger-text);
}
// Contextual backgrounds
// For now we'll leave these alongside the text classes until v4 when we can
// safely shift things around (per SemVer rules).
.bg-primary {
// Given the contrast here, this is the only class to have its color inverted
// automatically.
color: #fff;
.bg-variant(@brand-primary);
}
.bg-success {
.bg-variant(@state-success-bg);
}
.bg-info {
.bg-variant(@state-info-bg);
}
.bg-warning {
.bg-variant(@state-warning-bg);
}
.bg-danger {
.bg-variant(@state-danger-bg);
}
// Page header
// -------------------------
.page-header {
padding-bottom: ((@line-height-computed / 2) - 1);
margin: (@line-height-computed * 2) 0 @line-height-computed;
border-bottom: 1px solid @page-header-border-color;
}
// Lists
// -------------------------
// Unordered and Ordered lists
ul,
ol {
margin-top: 0;
margin-bottom: (@line-height-computed / 2);
ul,
ol {
margin-bottom: 0;
}
}
// List options
// Unstyled keeps list items block level, just removes default browser padding and list-style
.list-unstyled {
padding-left: 0;
list-style: none;
}
// Inline turns list items into inline-block
.list-inline {
.list-unstyled();
margin-left: -5px;
> li {
display: inline-block;
padding-left: 5px;
padding-right: 5px;
}
}
// Description Lists
dl {
margin-top: 0; // Remove browser default
margin-bottom: @line-height-computed;
}
dt,
dd {
line-height: @line-height-base;
}
dt {
font-weight: bold;
}
dd {
margin-left: 0; // Undo browser default
}
// Horizontal description lists
//
// Defaults to being stacked without any of the below styles applied, until the
// grid breakpoint is reached (default of ~768px).
.dl-horizontal {
dd {
&:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present
}
@media (min-width: @grid-float-breakpoint) {
dt {
float: left;
width: (@dl-horizontal-offset - 20);
clear: left;
text-align: right;
.text-overflow();
}
dd {
margin-left: @dl-horizontal-offset;
}
}
}
// Misc
// -------------------------
// Abbreviations and acronyms
abbr[title],
// Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257
abbr[data-original-title] {
cursor: help;
border-bottom: 1px dotted @abbr-border-color;
}
.initialism {
font-size: 90%;
.text-uppercase();
}
// Blockquotes
blockquote {
padding: (@line-height-computed / 2) @line-height-computed;
margin: 0 0 @line-height-computed;
font-size: @blockquote-font-size;
border-left: 5px solid @blockquote-border-color;
p,
ul,
ol {
&:last-child {
margin-bottom: 0;
}
}
// Note: Deprecated small and .small as of v3.1.0
// Context: https://github.com/twbs/bootstrap/issues/11660
footer,
small,
.small {
display: block;
font-size: 80%; // back to default font-size
line-height: @line-height-base;
color: @blockquote-small-color;
&:before {
content: '\2014 \00A0'; // em dash, nbsp
}
}
}
// Opposite alignment of blockquote
//
// Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0.
.blockquote-reverse,
blockquote.pull-right {
padding-right: 15px;
padding-left: 0;
border-right: 5px solid @blockquote-border-color;
border-left: 0;
text-align: right;
// Account for citation
footer,
small,
.small {
&:before { content: ''; }
&:after {
content: '\00A0 \2014'; // nbsp, em dash
}
}
}
// Addresses
address {
margin-bottom: @line-height-computed;
font-style: normal;
line-height: @line-height-base;
}

View File

@ -0,0 +1,55 @@
//
// Utility classes
// --------------------------------------------------
// Floats
// -------------------------
.clearfix {
.clearfix();
}
.center-block {
.center-block();
}
.pull-right {
float: right !important;
}
.pull-left {
float: left !important;
}
// Toggling content
// -------------------------
// Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1
.hide {
display: none !important;
}
.show {
display: block !important;
}
.invisible {
visibility: hidden;
}
.text-hide {
.text-hide();
}
// Hide from screenreaders and browsers
//
// Credit: HTML5 Boilerplate
.hidden {
display: none !important;
}
// For Affix plugin
// -------------------------
.affix {
position: fixed;
}

View File

@ -0,0 +1,861 @@
//
// Variables
// --------------------------------------------------
//== Colors
//
//## Gray and brand colors for use across Bootstrap.
@gray-base: #000;
@gray-darker: lighten(@gray-base, 13.5%); // #222
@gray-dark: lighten(@gray-base, 20%); // #333
@gray: lighten(@gray-base, 33.5%); // #555
@gray-light: lighten(@gray-base, 46.7%); // #777
@gray-lighter: lighten(@gray-base, 93.5%); // #eee
@brand-primary: darken(#428bca, 6.5%); // #337ab7
@brand-success: #5cb85c;
@brand-info: #5bc0de;
@brand-warning: #f0ad4e;
@brand-danger: #d9534f;
//== Scaffolding
//
//## Settings for some of the most global styles.
//** Background color for `<body>`.
@body-bg: #fff;
//** Global text color on `<body>`.
@text-color: @gray-dark;
//** Global textual link color.
@link-color: @brand-primary;
//** Link hover color set via `darken()` function.
@link-hover-color: darken(@link-color, 15%);
//** Link hover decoration.
@link-hover-decoration: underline;
//== Typography
//
//## Font, line-height, and color for body text, headings, and more.
@font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif;
@font-family-serif: Georgia, "Times New Roman", Times, serif;
//** Default monospace fonts for `<code>`, `<kbd>`, and `<pre>`.
@font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace;
@font-family-base: @font-family-sans-serif;
@font-size-base: 14px;
@font-size-large: ceil((@font-size-base * 1.25)); // ~18px
@font-size-small: ceil((@font-size-base * 0.85)); // ~12px
@font-size-h1: floor((@font-size-base * 2.6)); // ~36px
@font-size-h2: floor((@font-size-base * 2.15)); // ~30px
@font-size-h3: ceil((@font-size-base * 1.7)); // ~24px
@font-size-h4: ceil((@font-size-base * 1.25)); // ~18px
@font-size-h5: @font-size-base;
@font-size-h6: ceil((@font-size-base * 0.85)); // ~12px
//** Unit-less `line-height` for use in components like buttons.
@line-height-base: 1.428571429; // 20/14
//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
@line-height-computed: floor((@font-size-base * @line-height-base)); // ~20px
//** By default, this inherits from the `<body>`.
@headings-font-family: inherit;
@headings-font-weight: 500;
@headings-line-height: 1.1;
@headings-color: inherit;
//== Iconography
//
//## Specify custom location and filename of the included Glyphicons icon font. Useful for those including Bootstrap via Bower.
//** Load fonts from this directory.
@icon-font-path: "../fonts/";
//** File name for all font files.
@icon-font-name: "glyphicons-halflings-regular";
//** Element ID within SVG icon file.
@icon-font-svg-id: "glyphicons_halflingsregular";
//== Components
//
//## Define common padding and border radius sizes and more. Values based on 14px text and 1.428 line-height (~20px to start).
@padding-base-vertical: 6px;
@padding-base-horizontal: 12px;
@padding-large-vertical: 10px;
@padding-large-horizontal: 16px;
@padding-small-vertical: 5px;
@padding-small-horizontal: 10px;
@padding-xs-vertical: 1px;
@padding-xs-horizontal: 5px;
@line-height-large: 1.3333333; // extra decimals for Win 8.1 Chrome
@line-height-small: 1.5;
@border-radius-base: 4px;
@border-radius-large: 6px;
@border-radius-small: 3px;
//** Global color for active items (e.g., navs or dropdowns).
@component-active-color: #fff;
//** Global background color for active items (e.g., navs or dropdowns).
@component-active-bg: @brand-primary;
//** Width of the `border` for generating carets that indicator dropdowns.
@caret-width-base: 4px;
//** Carets increase slightly in size for larger components.
@caret-width-large: 5px;
//== Tables
//
//## Customizes the `.table` component with basic values, each used across all table variations.
//** Padding for `<th>`s and `<td>`s.
@table-cell-padding: 8px;
//** Padding for cells in `.table-condensed`.
@table-condensed-cell-padding: 5px;
//** Default background color used for all tables.
@table-bg: transparent;
//** Background color used for `.table-striped`.
@table-bg-accent: #f9f9f9;
//** Background color used for `.table-hover`.
@table-bg-hover: #f5f5f5;
@table-bg-active: @table-bg-hover;
//** Border color for table and cell borders.
@table-border-color: #ddd;
//== Buttons
//
//## For each of Bootstrap's buttons, define text, background and border color.
@btn-font-weight: normal;
@btn-default-color: #333;
@btn-default-bg: #fff;
@btn-default-border: #ccc;
@btn-primary-color: #fff;
@btn-primary-bg: @brand-primary;
@btn-primary-border: darken(@btn-primary-bg, 5%);
@btn-success-color: #fff;
@btn-success-bg: @brand-success;
@btn-success-border: darken(@btn-success-bg, 5%);
@btn-info-color: #fff;
@btn-info-bg: @brand-info;
@btn-info-border: darken(@btn-info-bg, 5%);
@btn-warning-color: #fff;
@btn-warning-bg: @brand-warning;
@btn-warning-border: darken(@btn-warning-bg, 5%);
@btn-danger-color: #fff;
@btn-danger-bg: @brand-danger;
@btn-danger-border: darken(@btn-danger-bg, 5%);
@btn-link-disabled-color: @gray-light;
//== Forms
//
//##
//** `<input>` background color
@input-bg: #fff;
//** `<input disabled>` background color
@input-bg-disabled: @gray-lighter;
//** Text color for `<input>`s
@input-color: @gray;
//** `<input>` border color
@input-border: #ccc;
// TODO: Rename `@input-border-radius` to `@input-border-radius-base` in v4
//** Default `.form-control` border radius
// This has no effect on `<select>`s in some browsers, due to the limited stylability of `<select>`s in CSS.
@input-border-radius: @border-radius-base;
//** Large `.form-control` border radius
@input-border-radius-large: @border-radius-large;
//** Small `.form-control` border radius
@input-border-radius-small: @border-radius-small;
//** Border color for inputs on focus
@input-border-focus: #66afe9;
//** Placeholder text color
@input-color-placeholder: #999;
//** Default `.form-control` height
@input-height-base: (@line-height-computed + (@padding-base-vertical * 2) + 2);
//** Large `.form-control` height
@input-height-large: (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
//** Small `.form-control` height
@input-height-small: (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);
//** `.form-group` margin
@form-group-margin-bottom: 15px;
@legend-color: @gray-dark;
@legend-border-color: #e5e5e5;
//** Background color for textual input addons
@input-group-addon-bg: @gray-lighter;
//** Border color for textual input addons
@input-group-addon-border-color: @input-border;
//** Disabled cursor for form controls and buttons.
@cursor-disabled: not-allowed;
//== Dropdowns
//
//## Dropdown menu container and contents.
//** Background for the dropdown menu.
@dropdown-bg: #fff;
//** Dropdown menu `border-color`.
@dropdown-border: rgba(0,0,0,.15);
//** Dropdown menu `border-color` **for IE8**.
@dropdown-fallback-border: #ccc;
//** Divider color for between dropdown items.
@dropdown-divider-bg: #e5e5e5;
//** Dropdown link text color.
@dropdown-link-color: @gray-dark;
//** Hover color for dropdown links.
@dropdown-link-hover-color: darken(@gray-dark, 5%);
//** Hover background for dropdown links.
@dropdown-link-hover-bg: #f5f5f5;
//** Active dropdown menu item text color.
@dropdown-link-active-color: @component-active-color;
//** Active dropdown menu item background color.
@dropdown-link-active-bg: @component-active-bg;
//** Disabled dropdown menu item background color.
@dropdown-link-disabled-color: @gray-light;
//** Text color for headers within dropdown menus.
@dropdown-header-color: @gray-light;
//** Deprecated `@dropdown-caret-color` as of v3.1.0
@dropdown-caret-color: #000;
//-- Z-index master list
//
// Warning: Avoid customizing these values. They're used for a bird's eye view
// of components dependent on the z-axis and are designed to all work together.
//
// Note: These variables are not generated into the Customizer.
@zindex-navbar: 1000;
@zindex-dropdown: 1000;
@zindex-popover: 1060;
@zindex-tooltip: 1070;
@zindex-navbar-fixed: 1030;
@zindex-modal-background: 1040;
@zindex-modal: 1050;
//== Media queries breakpoints
//
//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
// Extra small screen / phone
//** Deprecated `@screen-xs` as of v3.0.1
@screen-xs: 480px;
//** Deprecated `@screen-xs-min` as of v3.2.0
@screen-xs-min: @screen-xs;
//** Deprecated `@screen-phone` as of v3.0.1
@screen-phone: @screen-xs-min;
// Small screen / tablet
//** Deprecated `@screen-sm` as of v3.0.1
@screen-sm: 768px;
@screen-sm-min: @screen-sm;
//** Deprecated `@screen-tablet` as of v3.0.1
@screen-tablet: @screen-sm-min;
// Medium screen / desktop
//** Deprecated `@screen-md` as of v3.0.1
@screen-md: 992px;
@screen-md-min: @screen-md;
//** Deprecated `@screen-desktop` as of v3.0.1
@screen-desktop: @screen-md-min;
// Large screen / wide desktop
//** Deprecated `@screen-lg` as of v3.0.1
@screen-lg: 1200px;
@screen-lg-min: @screen-lg;
//** Deprecated `@screen-lg-desktop` as of v3.0.1
@screen-lg-desktop: @screen-lg-min;
// So media queries don't overlap when required, provide a maximum
@screen-xs-max: (@screen-sm-min - 1);
@screen-sm-max: (@screen-md-min - 1);
@screen-md-max: (@screen-lg-min - 1);
//== Grid system
//
//## Define your custom responsive grid.
//** Number of columns in the grid.
@grid-columns: 12;
//** Padding between columns. Gets divided in half for the left and right.
@grid-gutter-width: 30px;
// Navbar collapse
//** Point at which the navbar becomes uncollapsed.
@grid-float-breakpoint: @screen-sm-min;
//** Point at which the navbar begins collapsing.
@grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
//== Container sizes
//
//## Define the maximum width of `.container` for different screen sizes.
// Small screen / tablet
@container-tablet: (720px + @grid-gutter-width);
//** For `@screen-sm-min` and up.
@container-sm: @container-tablet;
// Medium screen / desktop
@container-desktop: (940px + @grid-gutter-width);
//** For `@screen-md-min` and up.
@container-md: @container-desktop;
// Large screen / wide desktop
@container-large-desktop: (1140px + @grid-gutter-width);
//** For `@screen-lg-min` and up.
@container-lg: @container-large-desktop;
//== Navbar
//
//##
// Basics of a navbar
@navbar-height: 50px;
@navbar-margin-bottom: @line-height-computed;
@navbar-border-radius: @border-radius-base;
@navbar-padding-horizontal: floor((@grid-gutter-width / 2));
@navbar-padding-vertical: ((@navbar-height - @line-height-computed) / 2);
@navbar-collapse-max-height: 340px;
@navbar-default-color: #777;
@navbar-default-bg: #f8f8f8;
@navbar-default-border: darken(@navbar-default-bg, 6.5%);
// Navbar links
@navbar-default-link-color: #777;
@navbar-default-link-hover-color: #333;
@navbar-default-link-hover-bg: transparent;
@navbar-default-link-active-color: #555;
@navbar-default-link-active-bg: darken(@navbar-default-bg, 6.5%);
@navbar-default-link-disabled-color: #ccc;
@navbar-default-link-disabled-bg: transparent;
// Navbar brand label
@navbar-default-brand-color: @navbar-default-link-color;
@navbar-default-brand-hover-color: darken(@navbar-default-brand-color, 10%);
@navbar-default-brand-hover-bg: transparent;
// Navbar toggle
@navbar-default-toggle-hover-bg: #ddd;
@navbar-default-toggle-icon-bar-bg: #888;
@navbar-default-toggle-border-color: #ddd;
// Inverted navbar
// Reset inverted navbar basics
@navbar-inverse-color: lighten(@gray-light, 15%);
@navbar-inverse-bg: #222;
@navbar-inverse-border: darken(@navbar-inverse-bg, 10%);
// Inverted navbar links
@navbar-inverse-link-color: lighten(@gray-light, 15%);
@navbar-inverse-link-hover-color: #fff;
@navbar-inverse-link-hover-bg: transparent;
@navbar-inverse-link-active-color: @navbar-inverse-link-hover-color;
@navbar-inverse-link-active-bg: darken(@navbar-inverse-bg, 10%);
@navbar-inverse-link-disabled-color: #444;
@navbar-inverse-link-disabled-bg: transparent;
// Inverted navbar brand label
@navbar-inverse-brand-color: @navbar-inverse-link-color;
@navbar-inverse-brand-hover-color: #fff;
@navbar-inverse-brand-hover-bg: transparent;
// Inverted navbar toggle
@navbar-inverse-toggle-hover-bg: #333;
@navbar-inverse-toggle-icon-bar-bg: #fff;
@navbar-inverse-toggle-border-color: #333;
//== Navs
//
//##
//=== Shared nav styles
@nav-link-padding: 10px 15px;
@nav-link-hover-bg: @gray-lighter;
@nav-disabled-link-color: @gray-light;
@nav-disabled-link-hover-color: @gray-light;
//== Tabs
@nav-tabs-border-color: #ddd;
@nav-tabs-link-hover-border-color: @gray-lighter;
@nav-tabs-active-link-hover-bg: @body-bg;
@nav-tabs-active-link-hover-color: @gray;
@nav-tabs-active-link-hover-border-color: #ddd;
@nav-tabs-justified-link-border-color: #ddd;
@nav-tabs-justified-active-link-border-color: @body-bg;
//== Pills
@nav-pills-border-radius: @border-radius-base;
@nav-pills-active-link-hover-bg: @component-active-bg;
@nav-pills-active-link-hover-color: @component-active-color;
//== Pagination
//
//##
@pagination-color: @link-color;
@pagination-bg: #fff;
@pagination-border: #ddd;
@pagination-hover-color: @link-hover-color;
@pagination-hover-bg: @gray-lighter;
@pagination-hover-border: #ddd;
@pagination-active-color: #fff;
@pagination-active-bg: @brand-primary;
@pagination-active-border: @brand-primary;
@pagination-disabled-color: @gray-light;
@pagination-disabled-bg: #fff;
@pagination-disabled-border: #ddd;
//== Pager
//
//##
@pager-bg: @pagination-bg;
@pager-border: @pagination-border;
@pager-border-radius: 15px;
@pager-hover-bg: @pagination-hover-bg;
@pager-active-bg: @pagination-active-bg;
@pager-active-color: @pagination-active-color;
@pager-disabled-color: @pagination-disabled-color;
//== Jumbotron
//
//##
@jumbotron-padding: 30px;
@jumbotron-color: inherit;
@jumbotron-bg: @gray-lighter;
@jumbotron-heading-color: inherit;
@jumbotron-font-size: ceil((@font-size-base * 1.5));
//== Form states and alerts
//
//## Define colors for form feedback states and, by default, alerts.
@state-success-text: #3c763d;
@state-success-bg: #dff0d8;
@state-success-border: darken(spin(@state-success-bg, -10), 5%);
@state-info-text: #31708f;
@state-info-bg: #d9edf7;
@state-info-border: darken(spin(@state-info-bg, -10), 7%);
@state-warning-text: #8a6d3b;
@state-warning-bg: #fcf8e3;
@state-warning-border: darken(spin(@state-warning-bg, -10), 5%);
@state-danger-text: #a94442;
@state-danger-bg: #f2dede;
@state-danger-border: darken(spin(@state-danger-bg, -10), 5%);
//== Tooltips
//
//##
//** Tooltip max width
@tooltip-max-width: 200px;
//** Tooltip text color
@tooltip-color: #fff;
//** Tooltip background color
@tooltip-bg: #000;
@tooltip-opacity: .9;
//** Tooltip arrow width
@tooltip-arrow-width: 5px;
//** Tooltip arrow color
@tooltip-arrow-color: @tooltip-bg;
//== Popovers
//
//##
//** Popover body background color
@popover-bg: #fff;
//** Popover maximum width
@popover-max-width: 276px;
//** Popover border color
@popover-border-color: rgba(0,0,0,.2);
//** Popover fallback border color
@popover-fallback-border-color: #ccc;
//** Popover title background color
@popover-title-bg: darken(@popover-bg, 3%);
//** Popover arrow width
@popover-arrow-width: 10px;
//** Popover arrow color
@popover-arrow-color: @popover-bg;
//** Popover outer arrow width
@popover-arrow-outer-width: (@popover-arrow-width + 1);
//** Popover outer arrow color
@popover-arrow-outer-color: fadein(@popover-border-color, 5%);
//** Popover outer arrow fallback color
@popover-arrow-outer-fallback-color: darken(@popover-fallback-border-color, 20%);
//== Labels
//
//##
//** Default label background color
@label-default-bg: @gray-light;
//** Primary label background color
@label-primary-bg: @brand-primary;
//** Success label background color
@label-success-bg: @brand-success;
//** Info label background color
@label-info-bg: @brand-info;
//** Warning label background color
@label-warning-bg: @brand-warning;
//** Danger label background color
@label-danger-bg: @brand-danger;
//** Default label text color
@label-color: #fff;
//** Default text color of a linked label
@label-link-hover-color: #fff;
//== Modals
//
//##
//** Padding applied to the modal body
@modal-inner-padding: 15px;
//** Padding applied to the modal title
@modal-title-padding: 15px;
//** Modal title line-height
@modal-title-line-height: @line-height-base;
//** Background color of modal content area
@modal-content-bg: #fff;
//** Modal content border color
@modal-content-border-color: rgba(0,0,0,.2);
//** Modal content border color **for IE8**
@modal-content-fallback-border-color: #999;
//** Modal backdrop background color
@modal-backdrop-bg: #000;
//** Modal backdrop opacity
@modal-backdrop-opacity: .5;
//** Modal header border color
@modal-header-border-color: #e5e5e5;
//** Modal footer border color
@modal-footer-border-color: @modal-header-border-color;
@modal-lg: 900px;
@modal-md: 600px;
@modal-sm: 300px;
//== Alerts
//
//## Define alert colors, border radius, and padding.
@alert-padding: 15px;
@alert-border-radius: @border-radius-base;
@alert-link-font-weight: bold;
@alert-success-bg: @state-success-bg;
@alert-success-text: @state-success-text;
@alert-success-border: @state-success-border;
@alert-info-bg: @state-info-bg;
@alert-info-text: @state-info-text;
@alert-info-border: @state-info-border;
@alert-warning-bg: @state-warning-bg;
@alert-warning-text: @state-warning-text;
@alert-warning-border: @state-warning-border;
@alert-danger-bg: @state-danger-bg;
@alert-danger-text: @state-danger-text;
@alert-danger-border: @state-danger-border;
//== Progress bars
//
//##
//** Background color of the whole progress component
@progress-bg: #f5f5f5;
//** Progress bar text color
@progress-bar-color: #fff;
//** Variable for setting rounded corners on progress bar.
@progress-border-radius: @border-radius-base;
//** Default progress bar color
@progress-bar-bg: @brand-primary;
//** Success progress bar color
@progress-bar-success-bg: @brand-success;
//** Warning progress bar color
@progress-bar-warning-bg: @brand-warning;
//** Danger progress bar color
@progress-bar-danger-bg: @brand-danger;
//** Info progress bar color
@progress-bar-info-bg: @brand-info;
//== List group
//
//##
//** Background color on `.list-group-item`
@list-group-bg: #fff;
//** `.list-group-item` border color
@list-group-border: #ddd;
//** List group border radius
@list-group-border-radius: @border-radius-base;
//** Background color of single list items on hover
@list-group-hover-bg: #f5f5f5;
//** Text color of active list items
@list-group-active-color: @component-active-color;
//** Background color of active list items
@list-group-active-bg: @component-active-bg;
//** Border color of active list elements
@list-group-active-border: @list-group-active-bg;
//** Text color for content within active list items
@list-group-active-text-color: lighten(@list-group-active-bg, 40%);
//** Text color of disabled list items
@list-group-disabled-color: @gray-light;
//** Background color of disabled list items
@list-group-disabled-bg: @gray-lighter;
//** Text color for content within disabled list items
@list-group-disabled-text-color: @list-group-disabled-color;
@list-group-link-color: #555;
@list-group-link-hover-color: @list-group-link-color;
@list-group-link-heading-color: #333;
//== Panels
//
//##
@panel-bg: #fff;
@panel-body-padding: 15px;
@panel-heading-padding: 10px 15px;
@panel-footer-padding: @panel-heading-padding;
@panel-border-radius: @border-radius-base;
//** Border color for elements within panels
@panel-inner-border: #ddd;
@panel-footer-bg: #f5f5f5;
@panel-default-text: @gray-dark;
@panel-default-border: #ddd;
@panel-default-heading-bg: #f5f5f5;
@panel-primary-text: #fff;
@panel-primary-border: @brand-primary;
@panel-primary-heading-bg: @brand-primary;
@panel-success-text: @state-success-text;
@panel-success-border: @state-success-border;
@panel-success-heading-bg: @state-success-bg;
@panel-info-text: @state-info-text;
@panel-info-border: @state-info-border;
@panel-info-heading-bg: @state-info-bg;
@panel-warning-text: @state-warning-text;
@panel-warning-border: @state-warning-border;
@panel-warning-heading-bg: @state-warning-bg;
@panel-danger-text: @state-danger-text;
@panel-danger-border: @state-danger-border;
@panel-danger-heading-bg: @state-danger-bg;
//== Thumbnails
//
//##
//** Padding around the thumbnail image
@thumbnail-padding: 4px;
//** Thumbnail background color
@thumbnail-bg: @body-bg;
//** Thumbnail border color
@thumbnail-border: #ddd;
//** Thumbnail border radius
@thumbnail-border-radius: @border-radius-base;
//** Custom text color for thumbnail captions
@thumbnail-caption-color: @text-color;
//** Padding around the thumbnail caption
@thumbnail-caption-padding: 9px;
//== Wells
//
//##
@well-bg: #f5f5f5;
@well-border: darken(@well-bg, 7%);
//== Badges
//
//##
@badge-color: #fff;
//** Linked badge text color on hover
@badge-link-hover-color: #fff;
@badge-bg: @gray-light;
//** Badge text color in active nav link
@badge-active-color: @link-color;
//** Badge background color in active nav link
@badge-active-bg: #fff;
@badge-font-weight: bold;
@badge-line-height: 1;
@badge-border-radius: 10px;
//== Breadcrumbs
//
//##
@breadcrumb-padding-vertical: 8px;
@breadcrumb-padding-horizontal: 15px;
//** Breadcrumb background color
@breadcrumb-bg: #f5f5f5;
//** Breadcrumb text color
@breadcrumb-color: #ccc;
//** Text color of current page in the breadcrumb
@breadcrumb-active-color: @gray-light;
//** Textual separator for between breadcrumb elements
@breadcrumb-separator: "/";
//== Carousel
//
//##
@carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6);
@carousel-control-color: #fff;
@carousel-control-width: 15%;
@carousel-control-opacity: .5;
@carousel-control-font-size: 20px;
@carousel-indicator-active-bg: #fff;
@carousel-indicator-border-color: #fff;
@carousel-caption-color: #fff;
//== Close
//
//##
@close-font-weight: bold;
@close-color: #000;
@close-text-shadow: 0 1px 0 #fff;
//== Code
//
//##
@code-color: #c7254e;
@code-bg: #f9f2f4;
@kbd-color: #fff;
@kbd-bg: #333;
@pre-bg: #f5f5f5;
@pre-color: @gray-dark;
@pre-border-color: #ccc;
@pre-scrollable-max-height: 340px;
//== Type
//
//##
//** Horizontal offset for forms and lists.
@component-offset-horizontal: 180px;
//** Text muted color
@text-muted: @gray-light;
//** Abbreviations and acronyms border color
@abbr-border-color: @gray-light;
//** Headings small color
@headings-small-color: @gray-light;
//** Blockquote small color
@blockquote-small-color: @gray-light;
//** Blockquote font size
@blockquote-font-size: (@font-size-base * 1.25);
//** Blockquote border color
@blockquote-border-color: @gray-lighter;
//** Page header border color
@page-header-border-color: @gray-lighter;
//** Width of horizontal description list titles
@dl-horizontal-offset: @component-offset-horizontal;
//** Horizontal line color.
@hr-border: @gray-lighter;

29
doc/bootstrap/wells.less Normal file
View File

@ -0,0 +1,29 @@
//
// Wells
// --------------------------------------------------
// Base class
.well {
min-height: 20px;
padding: 19px;
margin-bottom: 20px;
background-color: @well-bg;
border: 1px solid @well-border;
border-radius: @border-radius-base;
.box-shadow(inset 0 1px 1px rgba(0,0,0,.05));
blockquote {
border-color: #ddd;
border-color: rgba(0,0,0,.15);
}
}
// Sizes
.well-lg {
padding: 24px;
border-radius: @border-radius-large;
}
.well-sm {
padding: 9px;
border-radius: @border-radius-small;
}

124
doc/build.py Executable file
View File

@ -0,0 +1,124 @@
#!/usr/bin/env python
# Build the documentation.
from __future__ import print_function
import errno, os, shutil, sys, tempfile
from subprocess import check_call, check_output, CalledProcessError, Popen, PIPE
from distutils.version import LooseVersion
versions = ['1.0.0', '1.1.0', '2.0.0', '3.0.2', '4.0.0', '4.1.0', '5.0.0', '5.1.0', '5.2.0', '5.2.1', '5.3.0', '6.0.0']
def pip_install(package, commit=None, **kwargs):
"Install package using pip."
min_version = kwargs.get('min_version')
if min_version:
from pkg_resources import get_distribution, DistributionNotFound
try:
installed_version = get_distribution(os.path.basename(package)).version
if LooseVersion(installed_version) >= min_version:
print('{} {} already installed'.format(package, min_version))
return
except DistributionNotFound:
pass
if commit:
package = 'git+https://github.com/{0}.git@{1}'.format(package, commit)
print('Installing {0}'.format(package))
check_call(['pip', 'install', package])
def create_build_env(dirname='virtualenv'):
# Create virtualenv.
if not os.path.exists(dirname):
check_call(['virtualenv', dirname])
import sysconfig
scripts_dir = os.path.basename(sysconfig.get_path('scripts'))
activate_this_file = os.path.join(dirname, scripts_dir, 'activate_this.py')
with open(activate_this_file) as f:
exec(f.read(), dict(__file__=activate_this_file))
# Import get_distribution after activating virtualenv to get info about
# the correct packages.
from pkg_resources import get_distribution, DistributionNotFound
# Upgrade pip because installation of sphinx with pip 1.1 available on Travis
# is broken (see #207) and it doesn't support the show command.
pip_version = get_distribution('pip').version
if LooseVersion(pip_version) < LooseVersion('1.5.4'):
print("Updating pip")
check_call(['pip', 'install', '--upgrade', 'pip'])
# Upgrade distribute because installation of sphinx with distribute 0.6.24
# available on Travis is broken (see #207).
try:
distribute_version = get_distribution('distribute').version
if LooseVersion(distribute_version) <= LooseVersion('0.6.24'):
print("Updating distribute")
check_call(['pip', 'install', '--upgrade', 'distribute'])
except DistributionNotFound:
pass
# Install Sphinx and Breathe.
pip_install('sphinx-doc/sphinx', '12b83372ac9316e8cbe86e7fed889296a4cc29ee',
min_version='1.4.1.dev20160531')
pip_install('michaeljones/breathe',
'129222318f7c8f865d2631e7da7b033567e7f56a',
min_version='4.2.0')
def build_docs(version='dev', **kwargs):
doc_dir = kwargs.get('doc_dir', os.path.dirname(os.path.realpath(__file__)))
work_dir = kwargs.get('work_dir', '.')
include_dir = kwargs.get(
'include_dir', os.path.join(os.path.dirname(doc_dir), 'include', 'fmt'))
# Build docs.
cmd = ['doxygen', '-']
p = Popen(cmd, stdin=PIPE)
doxyxml_dir = os.path.join(work_dir, 'doxyxml')
p.communicate(input=r'''
PROJECT_NAME = fmt
GENERATE_LATEX = NO
GENERATE_MAN = NO
GENERATE_RTF = NO
CASE_SENSE_NAMES = NO
INPUT = {0}/core.h {0}/format.h {0}/ostream.h \
{0}/printf.h {0}/time.h
QUIET = YES
JAVADOC_AUTOBRIEF = YES
AUTOLINK_SUPPORT = NO
GENERATE_HTML = NO
GENERATE_XML = YES
XML_OUTPUT = {1}
ALIASES = "rst=\verbatim embed:rst"
ALIASES += "endrst=\endverbatim"
MACRO_EXPANSION = YES
PREDEFINED = _WIN32=1 \
FMT_USE_VARIADIC_TEMPLATES=1 \
FMT_USE_RVALUE_REFERENCES=1 \
FMT_USE_USER_DEFINED_LITERALS=1 \
FMT_USE_ALIAS_TEMPLATES=1 \
FMT_API= \
"FMT_BEGIN_NAMESPACE=namespace fmt {{" \
"FMT_END_NAMESPACE=}}" \
"FMT_STRING_ALIAS=1" \
"FMT_ENABLE_IF(B)="
EXCLUDE_SYMBOLS = fmt::internal::* StringValue write_str
'''.format(include_dir, doxyxml_dir).encode('UTF-8'))
if p.returncode != 0:
raise CalledProcessError(p.returncode, cmd)
html_dir = os.path.join(work_dir, 'html')
main_versions = reversed(versions[-3:])
check_call(['sphinx-build',
'-Dbreathe_projects.format=' + os.path.abspath(doxyxml_dir),
'-Dversion=' + version, '-Drelease=' + version,
'-Aversion=' + version, '-Aversions=' + ','.join(main_versions),
'-b', 'html', doc_dir, html_dir])
try:
check_call(['lessc', '--clean-css',
'--include-path=' + os.path.join(doc_dir, 'bootstrap'),
os.path.join(doc_dir, 'fmt.less'),
os.path.join(html_dir, '_static', 'fmt.css')])
except OSError as e:
if e.errno != errno.ENOENT:
raise
print('lessc not found; make sure that Less (http://lesscss.org/) ' +
'is installed')
sys.exit(1)
return html_dir
if __name__ == '__main__':
create_build_env()
build_docs(sys.argv[1])

View File

@ -21,9 +21,7 @@ import sys, os, re, subprocess
# -- General configuration ----------------------------------------------------- # -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here. # If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0' needs_sphinx = '1.2'
sys.path.append("../breathe")
if os.environ.get('READTHEDOCS', None) == 'True': if os.environ.get('READTHEDOCS', None) == 'True':
subprocess.call('doxygen') subprocess.call('doxygen')
@ -32,7 +30,6 @@ if os.environ.get('READTHEDOCS', None) == 'True':
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.ifconfig', 'breathe'] extensions = ['sphinx.ext.ifconfig', 'breathe']
breathe_projects = { "format": "doxyxml" }
breathe_default_project = "format" breathe_default_project = "format"
breathe_domain_by_extension = {"h" : "cpp"} breathe_domain_by_extension = {"h" : "cpp"}
@ -46,11 +43,11 @@ source_suffix = '.rst'
#source_encoding = 'utf-8-sig' #source_encoding = 'utf-8-sig'
# The master toctree document. # The master toctree document.
master_doc = 'index' #master_doc = 'contents'
# General information about the project. # General information about the project.
project = u'C++ Format' project = u'fmt'
copyright = u'2012-2014, Victor Zverovich' copyright = u'2012-present, Victor Zverovich'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
@ -58,18 +55,11 @@ copyright = u'2012-2014, Victor Zverovich'
# #
# The short X.Y version. # The short X.Y version.
# Get version from CMakeLists.txt. # Version and release are passed from CMake.
version = {} #version = None
with open('../CMakeLists.txt') as f:
for line in f:
m = re.match(r'set\(CPACK_PACKAGE_VERSION_([A-Z]+) ([0-9]+)\)', line.strip())
if m:
kind, value = m.groups()
version[kind] = value
version = '{}.{}.{}'.format(version['MAJOR'], version['MINOR'], version['PATCH'])
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = version #release = version
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.
@ -83,10 +73,10 @@ release = version
# List of patterns, relative to source directory, that match files and # List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files. # directories to ignore when looking for source files.
exclude_patterns = [] exclude_patterns = ['virtualenv']
# The reST default role (used for this markup: `text`) to use for all documents. # The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None default_role = 'cpp:any'
# If true, '()' will be appended to :func: etc. cross-reference text. # If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True #add_function_parentheses = True
@ -102,6 +92,10 @@ exclude_patterns = []
# The name of the Pygments (syntax highlighting) style to use. # The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx' pygments_style = 'sphinx'
highlight_language = 'c++'
primary_domain = 'cpp'
# A list of ignored prefixes for module index sorting. # A list of ignored prefixes for module index sorting.
#modindex_common_prefix = [] #modindex_common_prefix = []
@ -110,7 +104,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for # The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes. # a list of builtin themes.
html_theme = 'sphinxdoc' html_theme = 'basic-bootstrap'
# Theme options are theme-specific and customize the look and feel of a theme # Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the # further. For a list of options available for each theme, see the
@ -118,7 +112,7 @@ html_theme = 'sphinxdoc'
#html_theme_options = {} #html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory. # Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = [] html_theme_path = ['.']
# The name for this set of Sphinx documents. If None, it defaults to # The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation". # "<project> v<release> documentation".
@ -150,7 +144,9 @@ html_static_path = ['_static']
#html_use_smartypants = True #html_use_smartypants = True
# Custom sidebar templates, maps document names to template names. # Custom sidebar templates, maps document names to template names.
#html_sidebars = {} html_sidebars = {
'**': ['localtoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html']
}
# Additional templates that should be rendered to pages, maps page names to # Additional templates that should be rendered to pages, maps page names to
# template names. # template names.
@ -202,7 +198,7 @@ latex_elements = {
# Grouping the document tree into LaTeX files. List of tuples # Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]). # (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [ latex_documents = [
('index', 'format.tex', u'format Documentation', ('index', 'format.tex', u'fmt documentation',
u'Victor Zverovich', 'manual'), u'Victor Zverovich', 'manual'),
] ]
@ -232,8 +228,7 @@ latex_documents = [
# One entry per manual page. List of tuples # One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section). # (source start file, name, description, authors, manual section).
man_pages = [ man_pages = [
('index', 'format', u'format Documentation', ('index', 'fmt', u'fmt documentation', [u'Victor Zverovich'], 1)
[u'Victor Zverovich'], 1)
] ]
# If true, show URL addresses after external links. # If true, show URL addresses after external links.
@ -246,8 +241,8 @@ man_pages = [
# (source start file, target name, title, author, # (source start file, target name, title, author,
# dir menu entry, description, category) # dir menu entry, description, category)
texinfo_documents = [ texinfo_documents = [
('index', 'format', u'format Documentation', ('index', 'fmt', u'fmt documentation',
u'Victor Zverovich', 'format', 'One line description of project.', u'Victor Zverovich', 'fmt', 'One line description of project.',
'Miscellaneous'), 'Miscellaneous'),
] ]

10
doc/contents.rst Normal file
View File

@ -0,0 +1,10 @@
########
Contents
########
.. toctree::
:maxdepth: 2
usage
api
syntax

Some files were not shown because too many files have changed in this diff Show More