diff --git a/README.rst b/README.rst index fb4399f0..62ad15fc 100644 --- a/README.rst +++ b/README.rst @@ -28,9 +28,9 @@ Features * Format API with `format string syntax `_ similar to the one used by `str.format - `_ in Python. + `_ in Python. * Safe `printf implementation - `_ + `_ including the POSIX extension for positional arguments. * Support for user-defined types. * High speed: performance of the format API is close to that of @@ -103,10 +103,10 @@ An object of any user-defined type for which there is an overloaded // s == "The date is 2012-12-9" You can use the `FMT_VARIADIC -`_ +`_ macro to create your own functions similar to `format -`_ and -`print `_ +`_ and +`print `_ which take arbitrary arguments: .. code:: c++ @@ -132,10 +132,10 @@ Projects using this library * `AMPL/MP `_: An open-source library for mathematical programming -* `HarpyWar/pvpgn `_: +* `HarpyWar/pvpgn `_: Player vs Player Gaming Network with tweaks -* `KBEngine `_: An open-source MMOG server engine +* `KBEngine `_: An open-source MMOG server engine * `Lifeline `_: A 2D game @@ -148,7 +148,7 @@ Projects using this library * `redis-cerberus `_: A Redis cluster proxy -* `Saddy `_: +* `Saddy `_: Small crossplatform 2D graphic engine * `Salesforce Analytics Cloud `_: @@ -188,7 +188,7 @@ doesn't support user-defined types. Printf also has safety issues although they are mostly solved with `__attribute__ ((format (printf, ...)) `_ in GCC. There is a POSIX extension that adds positional arguments required for -`i18n `_ +`i18n `_ to printf but it is not a part of C99 and may not be available on some platforms. @@ -376,7 +376,7 @@ C++ Format is distributed under the BSD `license The `Format String Syntax `_ section in the documentation is based on the one from Python `string module -documentation `_ +documentation `_ adapted for the current library. For this reason the documentation is distributed under the Python Software Foundation license available in `doc/python-license.txt @@ -409,4 +409,4 @@ formatting. Thanks `Ruslan Baratov `_ for comprehensiv and useful comments regarding performance, `Boris Kaul `_ for `C++ counting digits benchmark `_. Thanks to `CarterLi `_ for contributing various -improvements to the code. +improvements to the code. \ No newline at end of file diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html index e14bb0ad..120b5f61 100644 --- a/doc/_templates/layout.html +++ b/doc/_templates/layout.html @@ -53,6 +53,7 @@ diff --git a/doc/api.rst b/doc/api.rst index ecd442a1..137ff984 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -8,8 +8,8 @@ All functions and classes provided by the C++ Format library reside in namespace ``fmt`` and macros have prefix ``FMT_``. For brevity the namespace is usually omitted in examples. -Formatting functions -==================== +Format API +========== The following functions use :ref:`format string syntax ` similar to the one used by Python's `str.format @@ -36,8 +36,11 @@ arguments in the resulting string. .. doxygenfunction:: print(std::ostream&, CStringRef, ArgList) +.. doxygenclass:: fmt::BasicFormatter + :members: + Printf formatting functions -=========================== +--------------------------- The following functions use `printf format string syntax `_ with @@ -45,7 +48,9 @@ a POSIX extension for positional arguments. .. doxygenfunction:: printf(CStringRef, ArgList) -.. doxygenfunction:: fprintf(std::FILE*, CStringRef, ArgList) +.. doxygenfunction:: fprintf(std::FILE *, CStringRef, ArgList) + +.. doxygenfunction:: fprintf(std::ostream&, CStringRef, ArgList) .. doxygenfunction:: sprintf(CStringRef, ArgList) diff --git a/doc/build.py b/doc/build.py index d5cb71ff..a7449c04 100755 --- a/doc/build.py +++ b/doc/build.py @@ -69,10 +69,12 @@ def build_docs(version='dev'): XML_OUTPUT = doxyxml 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_USER_DEFINED_LITERALS=1 \ + FMT_API= EXCLUDE_SYMBOLS = fmt::internal::* StringValue write_str '''.format(os.path.dirname(doc_dir)).encode('UTF-8')) if p.returncode != 0: diff --git a/doc/cppformat.less b/doc/cppformat.less index f3e78a65..55c716b8 100644 --- a/doc/cppformat.less +++ b/doc/cppformat.less @@ -59,3 +59,8 @@ div.sphinxsidebar { p.rubric { margin-top: 10px; } + +.github-btn { + border: 0; + overflow: hidden; +}