├── .gitignore ├── .travis.yml ├── AUTHORS ├── CREDITS ├── Makefile.am ├── README ├── README.rst ├── TODO ├── UNLICENSE ├── VERSION ├── autogen.sh ├── configure.ac ├── configure.sh ├── doc ├── doxygen │ ├── .gitignore │ ├── Doxyfile │ └── mainpage.h ├── examples │ ├── .gitignore │ ├── Makefile │ ├── http.cc │ ├── json.cc │ ├── md5.cc │ ├── sha1.cc │ ├── uri.cc │ ├── utf8.cc │ └── uuid.cc └── manual │ └── .gitkeep ├── etc ├── aclocal │ ├── .gitkeep │ └── ax_cxx_compile_stdcxx_11.m4 ├── coverity │ └── model.cc ├── debian │ └── .gitkeep ├── doap.rdf └── macports │ └── .gitkeep ├── ffi └── .gitkeep ├── src ├── .gitignore ├── Makefile.am ├── rfc.h └── rfc │ ├── .gitignore │ ├── Makefile.am │ ├── feature.cc │ ├── feature.h │ ├── http │ ├── http.h │ ├── ipv4 │ └── ipv4_address.h │ ├── json │ ├── json.h │ ├── md5 │ ├── md5.h │ ├── module.cc │ ├── module.h │ ├── rfc1321.h │ ├── rfc1321 │ ├── md5_digest.cc │ └── md5_digest.h │ ├── rfc2616.h │ ├── rfc2616 │ ├── http_request.cc │ ├── http_request.h │ ├── http_response.cc │ └── http_response.h │ ├── rfc3174.h │ ├── rfc3174 │ ├── sha1_digest.cc │ └── sha1_digest.h │ ├── rfc3629.h │ ├── rfc3629 │ ├── utf8_decode.cc │ ├── utf8_decode.h │ ├── utf8_encode.cc │ └── utf8_encode.h │ ├── rfc3986.h │ ├── rfc3986 │ ├── uri.cc │ └── uri.h │ ├── rfc4122.h │ ├── rfc4122 │ ├── uuid.cc │ └── uuid.h │ ├── rfc4627.h │ ├── rfc4627 │ ├── json_array.cc │ ├── json_array.h │ ├── json_boolean.cc │ ├── json_boolean.h │ ├── json_number.cc │ ├── json_number.h │ ├── json_object.cc │ ├── json_object.h │ ├── json_reader.cc │ ├── json_reader.h │ ├── json_string.cc │ ├── json_string.h │ ├── json_value.cc │ ├── json_value.h │ ├── json_writer.cc │ └── json_writer.h │ ├── sha1 │ ├── sha1.h │ ├── uri │ ├── uri.h │ ├── utf8 │ ├── utf8.h │ ├── util │ └── str.h │ ├── uuid │ ├── uuid.h │ ├── version.cc │ └── version.h.in └── test ├── .gitignore ├── Makefile.am ├── catch.hpp ├── check_feature.cc ├── check_http.cc ├── check_json.cc ├── check_md5.cc ├── check_module.cc ├── check_sha1.cc ├── check_uri.cc ├── check_utf8.cc ├── check_util_str.cc ├── check_uuid.cc └── check_version.cc /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .tmp/ 3 | pkg/ 4 | tmp/ 5 | *~ 6 | 7 | # GNU Autotools 8 | etc/aclocal/ 9 | Makefile 10 | Makefile.in 11 | aclocal.m4 12 | autom4te.cache/ 13 | config.log 14 | config.status 15 | configure 16 | libtool 17 | stamp-h1 18 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # https://travis-ci.org/dryproject/librfc 2 | language: cpp 3 | compiler: 4 | - clang 5 | - gcc 6 | before_install: 7 | - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test 8 | - sudo apt-get update -qq 9 | - if [ "$CXX" = "clang++" ]; then sudo apt-get install -qq libstdc++-4.8-dev; fi 10 | - if [ "$CXX" = "g++" ]; then sudo apt-get install -qq g++-4.8; fi 11 | - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi 12 | before_script: 13 | - ./autogen.sh 14 | script: 15 | - if [ "$COVERITY_SCAN_BRANCH" != 1 ]; then ./configure && make && make check; fi 16 | branches: 17 | only: 18 | - master 19 | - coverity 20 | 21 | # https://scan.coverity.com/projects/3227 22 | env: 23 | global: 24 | - secure: "ec4mmJ7SGCDxa2j/dZ/5Yb+Hz5ZPHa3t7JuA/R++ezVlHIjlso4LFMH7H0mRFo9sQ+QRSnzMT5Gae5iMzcVrINndQoGXeULX7NefBjiC/4HTN7lV7eedgIaM9OE7x5zRJj0pQvicQHhHTAFhzPCqlbPNlajXNdpmC/jkb/DTmYk=" # COVERITY_SCAN_TOKEN 25 | addons: 26 | coverity_scan: 27 | project: 28 | name: dryproject/librfc 29 | notification_email: arto@bendiken.net 30 | build_command_prepend: cov-configure --comptype gcc --compiler $CC && ./configure 31 | build_command: make 32 | branch_pattern: coverity 33 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | * Arto Bendiken 2 | -------------------------------------------------------------------------------- /CREDITS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drycpp/librfc/dae5fa85afcfd2f2f1d6f6de7a7cf95ce0e53d46/CREDITS -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = src test #doc 2 | EXTRA_DIST = AUTHORS CREDITS README UNLICENSE VERSION 3 | ACLOCAL_AMFLAGS = -I etc/aclocal 4 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | README.rst -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ************************************* 2 | librfc: RFC implementations for C++14 3 | ************************************* 4 | 5 | .. image:: https://api.travis-ci.org/dryproject/librfc.svg?branch=master 6 | :target: https://travis-ci.org/dryproject/librfc 7 | :alt: Travis CI build status 8 | 9 | .. image:: https://scan.coverity.com/projects/3227/badge.svg 10 | :target: https://scan.coverity.com/projects/3227 11 | :alt: Coverity Scan build status 12 | 13 | ``librfc`` is a C/C++ shared library containing public domain implementations 14 | of core RFC data structures and algorithms written in C++11. 15 | 16 | Features 17 | ======== 18 | 19 | * No runtime dependencies other than the system's C++ standard library. 20 | * No build prerequisites beyond the Autotools toolchain and a C++11 compiler. 21 | * Compatible with Clang and GCC, or any standard C++11 implementation. 22 | * Plays nice with others: all exported symbols are prefixed with ``rfc``. 23 | * 100% free and unencumbered `public domain `_ software, 24 | usable in any context and for any purpose. 25 | 26 | Current Status 27 | ============== 28 | 29 | This table summarizes which RFC specifications are implemented at present: 30 | 31 | =============== ======== ==================================== ================== 32 | Header Spec Description Status 33 | =============== ======== ==================================== ================== 34 | RFC 2616 Hypertext Transfer Protocol HTTP/1.1 WIP 35 | RFC 4627 JavaScript Object Notation (JSON) WIP 36 | RFC 1321 The MD5 Message-Digest Algorithm WIP 37 | RFC 3174 US Secure Hash Algorithm 1 (SHA1) WIP 38 | RFC 3986 Uniform Resource Identifier (URI) WIP 39 | RFC 3629 UTF-8 WIP 40 | RFC 4122 Universally Unique Identifier (UUID) WIP 41 | =============== ======== ==================================== ================== 42 | 43 | Build Prerequisites 44 | =================== 45 | 46 | * Clang_ (>= 3.2) or GCC_ (>= 4.8) 47 | * Autoconf_ (>= 2.68) 48 | * Automake_ (>= 1.11) 49 | * Libtool_ (>= 2.2) 50 | 51 | .. note:: 52 | 53 | Older releases may work, but are not actively tested for. 54 | 55 | .. _Clang: http://clang.llvm.org/ 56 | .. _GCC: http://gcc.gnu.org/ 57 | .. _Autoconf: http://www.gnu.org/software/autoconf/ 58 | .. _Automake: http://www.gnu.org/software/automake/ 59 | .. _Libtool: http://www.gnu.org/software/libtool/ 60 | 61 | Installation 62 | ============ 63 | 64 | Installation on Unix 65 | -------------------- 66 | 67 | :: 68 | 69 | $ ./autogen.sh 70 | $ ./configure # on Linux 71 | $ ./configure --with-stdlib=libc++ # on FreeBSD / Mac OS X 72 | $ make 73 | $ sudo make install 74 | $ sudo ldconfig # on Linux 75 | 76 | Elsewhere 77 | ========= 78 | 79 | Find this project at: GitHub_, Bitbucket_, Ohloh_, Freecode_, SourceForge_, 80 | `Travis CI`_, `Coverity Scan`_, Twitter_, and Tumblr_. 81 | 82 | .. _GitHub: http://github.com/dryproject/librfc 83 | .. _Bitbucket: http://bitbucket.org/dryproject/librfc 84 | .. _Ohloh: http://www.ohloh.net/p/librfc 85 | .. _Freecode: http://freecode.com/projects/librfc 86 | .. _SourceForge: http://sourceforge.net/projects/librfc/ 87 | .. _Travis CI: http://travis-ci.org/dryproject/librfc 88 | .. _Coverity Scan: http://scan.coverity.com/projects/3227 89 | .. _Twitter: http://twitter.com/librfc 90 | .. _Tumblr: http://librfc.tumblr.com/ 91 | 92 | Author 93 | ====== 94 | 95 | This project is part of the `DRY `_ initiative. 96 | 97 | * `Arto Bendiken `_ - http://ar.to/ 98 | 99 | Donations 100 | ========= 101 | 102 | If you found this software useful and would like to encourage its 103 | maintenance and further development, please consider making a $5 donation 104 | to the author(s) via Gratipay_ or Bitcoin_. 105 | 106 | .. _Gratipay: https://gratipay.com/bendiken/ 107 | .. _Bitcoin: bitcoin:1BahgMdZYkLYmauNeu2fJKYKmeLy9ysqur?label=librfc.org&message=Donation 108 | 109 | License 110 | ======= 111 | 112 | This is free and unencumbered public domain software. For more information, 113 | see http://unlicense.org/ or the accompanying ``UNLICENSE`` file. 114 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | Nice to Haves: rfc4627::json_writer 2 | ----------------------------------- 3 | - Replace std::uint32_t with std::char32_t once is available. 4 | http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2249.html 5 | http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.2011 6 | 7 | Specs: Authentication and Authorization 8 | --------------------------------------- 9 | 10 | - RFC 4422: Simple Authentication and Security Layer (SASL) 11 | http://tools.ietf.org/html/rfc4422 12 | - RFC 5849: The OAuth 1.0 Protocol 13 | http://tools.ietf.org/html/rfc5849 14 | - RFC 6749: The OAuth 2.0 Authorization Framework 15 | http://tools.ietf.org/html/rfc6749 16 | - RFC 6750: The OAuth 2.0 Authorization Framework: Bearer Token Usage 17 | http://tools.ietf.org/html/rfc6750 18 | 19 | Specs: Character Encoding 20 | ------------------------- 21 | 22 | - RFC 20: ASCII format for Network Interchange 23 | http://tools.ietf.org/html/rfc20 24 | - RFC 2277: IETF Policy on Character Sets and Languages 25 | http://tools.ietf.org/html/rfc2277 26 | - RFC 2781: UTF-16, an encoding of ISO 10646 27 | http://tools.ietf.org/html/rfc2781 28 | ~ RFC 3629: UTF-8, a transformation format of ISO 10646 29 | http://tools.ietf.org/html/rfc3629 30 | ! RFC 4648: The Base16, Base32, and Base64 Data Encodings 31 | http://tools.ietf.org/html/rfc4648 32 | - RFC 5198: Unicode Format for Network Interchange 33 | http://tools.ietf.org/html/rfc5198 34 | 35 | Specs: Compression 36 | ------------------ 37 | 38 | - RFC 1950: ZLIB Compressed Data Format Specification version 3.3 39 | http://tools.ietf.org/html/rfc1950 40 | - RFC 1951: DEFLATE Compressed Data Format Specification version 1.3 41 | http://tools.ietf.org/html/rfc1951 42 | - RFC 1952: GZIP file format specification version 4.3 43 | http://tools.ietf.org/html/rfc1952 44 | 45 | Specs: Cryptography 46 | ------------------- 47 | 48 | ~ RFC 1321: The MD5 Message-Digest Algorithm 49 | http://tools.ietf.org/html/rfc1321 50 | - RFC 2085: HMAC-MD5 IP Authentication with Replay Prevention 51 | http://tools.ietf.org/html/rfc2085 52 | - RFC 2104: HMAC: Keyed-Hashing for Message Authentication 53 | http://tools.ietf.org/html/rfc2104 54 | - RFC 2410: The NULL Encryption Algorithm and Its Use With IPsec 55 | http://tools.ietf.org/html/rfc2410 56 | ~ RFC 3174: US Secure Hash Algorithm 1 (SHA1) 57 | http://tools.ietf.org/html/rfc3174 58 | - RFC 4880: OpenPGP Message Format 59 | http://tools.ietf.org/html/rfc4880 60 | - RFC 5246: The Transport Layer Security (TLS) Protocol Version 1.2 61 | http://tools.ietf.org/html/rfc5246 62 | - RFC 5581: The Camellia Cipher in OpenPGP 63 | http://tools.ietf.org/html/rfc5581 64 | - RFC 6234: US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF) 65 | http://tools.ietf.org/html/rfc6234 66 | 67 | Specs: CSV Format 68 | ----------------- 69 | 70 | - RFC 4180: Common Format and MIME Type for Comma-Separated Values (CSV) Files 71 | http://tools.ietf.org/html/rfc4180 72 | 73 | Specs: Date/Time 74 | ---------------- 75 | 76 | ! RFC 3339: Date and Time on the Internet: Timestamps 77 | http://tools.ietf.org/html/rfc3339 78 | 79 | Specs: IRC Protocol 80 | ------------------- 81 | 82 | - RFC 1459: Internet Relay Chat Protocol 83 | http://tools.ietf.org/html/rfc1459 84 | - RFC 2810: Internet Relay Chat: Architecture 85 | http://tools.ietf.org/html/rfc2810 86 | - RFC 2811: Internet Relay Chat: Channel Management 87 | http://tools.ietf.org/html/rfc2811 88 | - RFC 2812: Internet Relay Chat: Client Protocol 89 | http://tools.ietf.org/html/rfc2812 90 | - RFC 2813: Internet Relay Chat: Server Protocol 91 | http://tools.ietf.org/html/rfc2813 92 | 93 | Specs: JSON Format 94 | ------------------ 95 | 96 | ~ RFC 4627: The application/json Media Type for JavaScript Object Notation (JSON) 97 | http://tools.ietf.org/html/rfc4627 98 | - RFC 6901: JavaScript Object Notation (JSON) Pointer 99 | http://tools.ietf.org/html/rfc6901 100 | 101 | Specs: Language Tags 102 | -------------------- 103 | 104 | - RFC 4645: Initial Language Subtag Registry 105 | http://tools.ietf.org/html/rfc4645 106 | - RFC 4647: Matching of Language Tags 107 | http://tools.ietf.org/html/rfc4647 108 | - RFC 5646: Tags for Identifying Languages 109 | http://tools.ietf.org/html/rfc5646 110 | 111 | Specs: Multipurpose Internet Mail Extensions (MIME) 112 | --------------------------------------------------- 113 | 114 | - RFC 2045: MIME Part One: Format of Internet Message Bodies 115 | http://tools.ietf.org/html/rfc2045 116 | - RFC 2046: MIME Part Two: Media Types 117 | http://tools.ietf.org/html/rfc2046 118 | - RFC 2047: MIME Part Three: Message Header Extensions for Non-ASCII Text 119 | http://tools.ietf.org/html/rfc2047 120 | - RFC 2049: MIME Part Five: Conformance Criteria and Examples 121 | http://tools.ietf.org/html/rfc2049 122 | - RFC 4288: Media Type Specifications and Registration Procedures 123 | http://tools.ietf.org/html/rfc4288 124 | - RFC 4289: MIME Part Four: Registration Procedures 125 | http://tools.ietf.org/html/rfc4289 126 | 127 | Specs: Remote Shell 128 | ------------------- 129 | 130 | - RFC 854: Telnet Protocol Specification 131 | http://tools.ietf.org/html/rfc854 132 | - RFC 4250: The Secure Shell (SSH) Protocol Assigned Numbers 133 | http://tools.ietf.org/html/rfc4250 134 | - RFC 4251: The Secure Shell (SSH) Protocol Architecture 135 | http://tools.ietf.org/html/rfc4251 136 | - RFC 4252: The Secure Shell (SSH) Authentication Protocol 137 | http://tools.ietf.org/html/rfc4252 138 | - RFC 4253: The Secure Shell (SSH) Transport Layer Protocol 139 | http://tools.ietf.org/html/rfc4253 140 | - RFC 4254: The Secure Shell (SSH) Connection Protocol 141 | http://tools.ietf.org/html/rfc4254 142 | - RFC 4255: Using DNS to Securely Publish Secure Shell (SSH) Key Fingerprints 143 | http://tools.ietf.org/html/rfc4255 144 | - RFC 4256: Generic Message Exchange Authentication for the Secure Shell Protocol (SSH) 145 | http://tools.ietf.org/html/rfc4256 146 | - RFC 6668: SHA-2 Data Integrity Verification for the Secure Shell (SSH) Transport Layer Protocol 147 | http://tools.ietf.org/html/rfc6668 148 | 149 | Specs: Simple Mail Transfer Protocol (SMTP) 150 | ------------------------------------------- 151 | 152 | - RFC 5321: Simple Mail Transfer Protocol 153 | http://tools.ietf.org/html/rfc5321 154 | 155 | Specs: Transport-Layer Security 156 | ------------------------------- 157 | 158 | - RFC 5246: The Transport Layer Security (TLS) Protocol Version 1.2 159 | http://tools.ietf.org/html/rfc5246 160 | - RFC 6176: Prohibiting Secure Sockets Layer (SSL) Version 2.0 161 | http://tools.ietf.org/html/rfc6176 162 | 163 | Specs: URIs, URNs, and URLs 164 | --------------------------- 165 | 166 | - RFC 2141: URN Syntax 167 | http://tools.ietf.org/html/rfc2141 168 | ~ RFC 3986: Uniform Resource Identifier (URI): Generic Syntax 169 | http://tools.ietf.org/html/rfc3986 170 | ~ RFC 4122: A Universally Unique IDentifier (UUID) URN Namespace 171 | http://tools.ietf.org/html/rfc4122 172 | - RFC 5122: Internationalized Resource Identifiers (IRIs) and Uniform Resource Identifiers (URIs) for the Extensible Messaging and Presence Protocol (XMPP) 173 | http://tools.ietf.org/html/rfc5122 174 | - RFC 6874: Representing IPv6 Zone Identifiers in Address Literals and Uniform Resource Identifiers 175 | http://tools.ietf.org/html/rfc6874 176 | 177 | Specs: World Wide Web 178 | --------------------- 179 | 180 | - RFC 1945: Hypertext Transfer Protocol -- HTTP/1.0 181 | http://tools.ietf.org/html/rfc1945 182 | ~ RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1 183 | http://tools.ietf.org/html/rfc2616 184 | ! RFC 3875: The Common Gateway Interface (CGI) Version 1.1 185 | http://tools.ietf.org/html/rfc3875 186 | - RFC 6266: Use of the Content-Disposition Header Field in the Hypertext Transfer Protocol (HTTP) 187 | http://tools.ietf.org/html/rfc6266 188 | - RFC 6455: The WebSocket Protocol 189 | http://tools.ietf.org/html/rfc6455 190 | - RFC 6585: Additional HTTP Status Codes 191 | http://tools.ietf.org/html/rfc6585 192 | - RFC 6265: HTTP State Management Mechanism 193 | http://tools.ietf.org/html/rfc6265 194 | * Internet-Draft: A New HTTP Status Code to Report Legal Obstacles 195 | http://tools.ietf.org/html/draft-tbray-http-legally-restricted-status-02 196 | * Internet-Draft: Hypertext Transfer Protocol version 2.0 197 | http://tools.ietf.org/html/draft-ietf-httpbis-http2-04 198 | -------------------------------------------------------------------------------- /UNLICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 0.0.0 2 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | autoreconf --force --install 3 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | dnl configure.ac -*- Autoconf -*- 2 | dnl 3 | dnl Process this file with `autoconf` to produce a configure script. 4 | dnl 5 | dnl This is free and unencumbered software released into the public domain. 6 | AC_PREREQ([2.68]) 7 | 8 | dnl Define version information: 9 | m4_define([VERSION_MAJOR], 10 | m4_esyscmd([cut -d'.' -f1 VERSION | tr -d '\n'])) 11 | m4_define([VERSION_MINOR], 12 | m4_esyscmd([cut -d'.' -f2 VERSION | tr -d '\n'])) 13 | m4_define([VERSION_PATCH], 14 | m4_esyscmd([cut -d'.' -f3 VERSION | tr -d '\n'])) 15 | m4_define([VERSION_STRING], 16 | m4_esyscmd([git describe --dirty --always | tr -d '\n'])) 17 | 18 | dnl Define package information: 19 | AC_INIT([librfc], [VERSION_STRING], 20 | [arto@bendiken.net], [librfc], 21 | [http://librfc.org/]) 22 | 23 | dnl Configure Autoconf: 24 | AC_CONFIG_HEADERS([src/config.h]) 25 | AC_CONFIG_SRCDIR([src/rfc.h]) 26 | AC_CONFIG_AUX_DIR([etc/aclocal]) 27 | AC_CONFIG_MACRO_DIR([etc/aclocal]) 28 | 29 | dnl Configure Automake: 30 | AM_INIT_AUTOMAKE([foreign -Wall -Werror dist-bzip2 subdir-objects nostdinc]) 31 | AM_SILENT_RULES([yes]) 32 | 33 | dnl Check for programs: 34 | AC_PROG_CC(clang gcc cc) 35 | AC_PROG_CC_C99 36 | AM_PROG_CC_C_O 37 | AC_PROG_CPP 38 | AC_PROG_CXX(clang++ g++ c++) 39 | AC_PROG_CXXCPP 40 | AC_USE_SYSTEM_EXTENSIONS 41 | m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) 42 | LT_INIT 43 | AC_LANG([C++]) 44 | AX_CXX_COMPILE_STDCXX_11([noext]) 45 | 46 | dnl Check for configuration options: 47 | # --with-stdlib=libstdc++|libc++ 48 | AC_ARG_WITH([stdlib], 49 | [AS_HELP_STRING([--with-stdlib=LIB], [specify the C++ standard library to use [default=system]])], 50 | [], [with_stdlib=system]) 51 | AS_IF([test "x$with_stdlib" != "xsystem"], 52 | [CXXFLAGS="$CXXFLAGS -stdlib=$with_stdlib" 53 | LDFLAGS="$LDFLAGS -stdlib=$with_stdlib"]) 54 | # --enable-debug/--disable-debug 55 | AC_ARG_ENABLE([debug], 56 | [AS_HELP_STRING([--enable-debug], [build with debugging support [default=no]])], 57 | [], [enable_debug=no]) 58 | AS_IF([test "x$enable_debug" != "xno"], 59 | [AC_DEFINE([DEBUG], [1], [Enable debugging support.])], 60 | [AC_DEFINE([NDEBUG], [1], [Disable assertions.])]) 61 | AM_CONDITIONAL([ENABLE_DEBUG], [test "x$enable_debug" != "xno"]) 62 | # --enable-unicode/--disable-unicode 63 | AC_ARG_ENABLE([unicode], 64 | [AS_HELP_STRING([--disable-unicode], [omit support for Unicode strings])]) 65 | AS_IF([test "x$enable_unicode" == "xno"], 66 | [AC_DEFINE([DISABLE_UNICODE], 1, [Define to disable Unicode string support.])]) 67 | # --enable-rfc*/--disable-rfc* 68 | AC_DEFUN([AX_ARG_ENABLE_RFC], [dnl 69 | AC_ARG_ENABLE([rfc$1], 70 | [AS_HELP_STRING([--disable-rfc$1], [do not include the RFC $1 ($2) module])]) 71 | AS_IF([test "x$enable_rfc$1" == "xno"], [ 72 | AC_DEFINE([DISABLE_RFC$1], 1, [Define to omit the module.])]) 73 | AM_CONDITIONAL([DISABLE_RFC$1], [test "x$enable_rfc$1" == "xno"]) 74 | ]) 75 | AX_ARG_ENABLE_RFC([1321], [MD5]) # --enable-rfc1321/--disable-rfc1321 76 | AX_ARG_ENABLE_RFC([2616], [HTTP/1.1]) # --enable-rfc2616/--disable-rfc2616 77 | AX_ARG_ENABLE_RFC([3174], [SHA-1]) # --enable-rfc3174/--disable-rfc3174 78 | AX_ARG_ENABLE_RFC([3629], [UTF-8]) # --enable-rfc3629/--disable-rfc3629 79 | AX_ARG_ENABLE_RFC([3986], [URI]) # --enable-rfc3986/--disable-rfc3986 80 | AX_ARG_ENABLE_RFC([4122], [UUID]) # --enable-rfc4122/--disable-rfc4122 81 | AX_ARG_ENABLE_RFC([4627], [JSON]) # --enable-rfc4627/--disable-rfc4627 82 | 83 | dnl Check for libraries: 84 | 85 | dnl Check for header files: 86 | AC_LANG_PUSH([C]) 87 | AC_HEADER_ASSERT 88 | AC_HEADER_STDBOOL 89 | AC_LANG_POP([C]) 90 | 91 | dnl Check for types: 92 | 93 | dnl Check for structures: 94 | 95 | dnl Check for compiler characteristics: 96 | AC_CANONICAL_HOST 97 | AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_srcdir)/src -iquote \$(srcdir)" 98 | AM_CXXFLAGS="$AM_CXXFLAGS -Wall -Wextra -pipe" 99 | AM_LDFLAGS="$AM_LDFLAGS" 100 | TEST_CPPFLAGS="$AM_CPPFLAGS -DCATCH_CONFIG_MAIN" 101 | TEST_CXXFLAGS="$AM_CXXFLAGS" 102 | TEST_LDFLAGS="$AM_LDFLAGS" 103 | AC_SUBST([AM_CPPFLAGS]) 104 | AC_SUBST([AM_CXXFLAGS]) 105 | AC_SUBST([AM_LDFLAGS]) 106 | AC_SUBST([TEST_CPPFLAGS]) 107 | AC_SUBST([TEST_CXXFLAGS]) 108 | AC_SUBST([TEST_LDFLAGS]) 109 | 110 | dnl Check for library functions: 111 | AC_FUNC_ALLOCA 112 | 113 | dnl Check for system services: 114 | 115 | dnl Generate output: 116 | AC_CONFIG_FILES([Makefile src/Makefile src/rfc/Makefile test/Makefile]) 117 | AC_SUBST([PACKAGE_VERSION_MAJOR], ["VERSION_MAJOR"]) 118 | AC_SUBST([PACKAGE_VERSION_MINOR], ["VERSION_MINOR"]) 119 | AC_SUBST([PACKAGE_VERSION_PATCH], ["VERSION_PATCH"]) 120 | AC_CONFIG_FILES([src/rfc/version.h]) 121 | dnl AH_BOTTOM([#include "rfc/prelude.h"]) 122 | AC_OUTPUT 123 | -------------------------------------------------------------------------------- /configure.sh: -------------------------------------------------------------------------------- 1 | #/bin/sh 2 | #export CC='gcc' 3 | #export CXX='g++' 4 | export CC='clang' 5 | export CXX='clang++ --stdlib=libc++' 6 | export CPPFLAGS='' 7 | export CFLAGS='-g -Os' 8 | export CXXFLAGS='-g -Os' 9 | export LDFLAGS='' 10 | ./configure $* 11 | -------------------------------------------------------------------------------- /doc/doxygen/.gitignore: -------------------------------------------------------------------------------- 1 | html 2 | latex 3 | man 4 | rtf 5 | xml 6 | -------------------------------------------------------------------------------- /doc/doxygen/Doxyfile: -------------------------------------------------------------------------------- 1 | # Doxyfile 1.8.3.1 2 | 3 | # This file describes the settings to be used by the documentation system 4 | # doxygen (www.doxygen.org) for a project. 5 | # 6 | # All text after a hash (#) is considered a comment and will be ignored. 7 | # The format is: 8 | # TAG = value [value, ...] 9 | # For lists items can also be appended using: 10 | # TAG += value [value, ...] 11 | # Values that contain spaces should be placed between quotes (" "). 12 | 13 | #--------------------------------------------------------------------------- 14 | # Project related configuration options 15 | #--------------------------------------------------------------------------- 16 | 17 | # This tag specifies the encoding used for all characters in the config file 18 | # that follow. The default is UTF-8 which is also the encoding used for all 19 | # text before the first occurrence of this tag. Doxygen uses libiconv (or the 20 | # iconv built into libc) for the transcoding. See 21 | # http://www.gnu.org/software/libiconv for the list of possible encodings. 22 | 23 | DOXYFILE_ENCODING = UTF-8 24 | 25 | # The PROJECT_NAME tag is a single word (or sequence of words) that should 26 | # identify the project. Note that if you do not use Doxywizard you need 27 | # to put quotes around the project name if it contains spaces. 28 | 29 | PROJECT_NAME = "librfc" 30 | 31 | # The PROJECT_NUMBER tag can be used to enter a project or revision number. 32 | # This could be handy for archiving the generated documentation or 33 | # if some version control system is used. 34 | 35 | PROJECT_NUMBER = 0.0.0 36 | 37 | # Using the PROJECT_BRIEF tag one can provide an optional one line description 38 | # for a project that appears at the top of each page and should give viewer 39 | # a quick idea about the purpose of the project. Keep the description short. 40 | 41 | PROJECT_BRIEF = 42 | 43 | # With the PROJECT_LOGO tag one can specify an logo or icon that is 44 | # included in the documentation. The maximum height of the logo should not 45 | # exceed 55 pixels and the maximum width should not exceed 200 pixels. 46 | # Doxygen will copy the logo to the output directory. 47 | 48 | PROJECT_LOGO = 49 | 50 | # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 51 | # base path where the generated documentation will be put. 52 | # If a relative path is entered, it will be relative to the location 53 | # where doxygen was started. If left blank the current directory will be used. 54 | 55 | OUTPUT_DIRECTORY = doc/doxygen 56 | 57 | # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 58 | # 4096 sub-directories (in 2 levels) under the output directory of each output 59 | # format and will distribute the generated files over these directories. 60 | # Enabling this option can be useful when feeding doxygen a huge amount of 61 | # source files, where putting all generated files in the same directory would 62 | # otherwise cause performance problems for the file system. 63 | 64 | CREATE_SUBDIRS = NO 65 | 66 | # The OUTPUT_LANGUAGE tag is used to specify the language in which all 67 | # documentation generated by doxygen is written. Doxygen will use this 68 | # information to generate all constant output in the proper language. 69 | # The default language is English, other supported languages are: 70 | # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 71 | # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, 72 | # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English 73 | # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, 74 | # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, 75 | # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. 76 | 77 | OUTPUT_LANGUAGE = English 78 | 79 | # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 80 | # include brief member descriptions after the members that are listed in 81 | # the file and class documentation (similar to JavaDoc). 82 | # Set to NO to disable this. 83 | 84 | BRIEF_MEMBER_DESC = YES 85 | 86 | # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 87 | # the brief description of a member or function before the detailed description. 88 | # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 89 | # brief descriptions will be completely suppressed. 90 | 91 | REPEAT_BRIEF = YES 92 | 93 | # This tag implements a quasi-intelligent brief description abbreviator 94 | # that is used to form the text in various listings. Each string 95 | # in this list, if found as the leading text of the brief description, will be 96 | # stripped from the text and the result after processing the whole list, is 97 | # used as the annotated text. Otherwise, the brief description is used as-is. 98 | # If left blank, the following values are used ("$name" is automatically 99 | # replaced with the name of the entity): "The $name class" "The $name widget" 100 | # "The $name file" "is" "provides" "specifies" "contains" 101 | # "represents" "a" "an" "the" 102 | 103 | ABBREVIATE_BRIEF = 104 | 105 | # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 106 | # Doxygen will generate a detailed section even if there is only a brief 107 | # description. 108 | 109 | ALWAYS_DETAILED_SEC = YES 110 | 111 | # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 112 | # inherited members of a class in the documentation of that class as if those 113 | # members were ordinary class members. Constructors, destructors and assignment 114 | # operators of the base classes will not be shown. 115 | 116 | INLINE_INHERITED_MEMB = NO 117 | 118 | # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 119 | # path before files name in the file list and in the header files. If set 120 | # to NO the shortest path that makes the file name unique will be used. 121 | 122 | FULL_PATH_NAMES = YES 123 | 124 | # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 125 | # can be used to strip a user-defined part of the path. Stripping is 126 | # only done if one of the specified strings matches the left-hand part of 127 | # the path. The tag can be used to show relative paths in the file list. 128 | # If left blank the directory from which doxygen is run is used as the 129 | # path to strip. Note that you specify absolute paths here, but also 130 | # relative paths, which will be relative from the directory where doxygen is 131 | # started. 132 | 133 | STRIP_FROM_PATH = src 134 | 135 | # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 136 | # the path mentioned in the documentation of a class, which tells 137 | # the reader which header file to include in order to use a class. 138 | # If left blank only the name of the header file containing the class 139 | # definition is used. Otherwise one should specify the include paths that 140 | # are normally passed to the compiler using the -I flag. 141 | 142 | STRIP_FROM_INC_PATH = 143 | 144 | # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 145 | # (but less readable) file names. This can be useful if your file system 146 | # doesn't support long names like on DOS, Mac, or CD-ROM. 147 | 148 | SHORT_NAMES = NO 149 | 150 | # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 151 | # will interpret the first line (until the first dot) of a JavaDoc-style 152 | # comment as the brief description. If set to NO, the JavaDoc 153 | # comments will behave just like regular Qt-style comments 154 | # (thus requiring an explicit @brief command for a brief description.) 155 | 156 | JAVADOC_AUTOBRIEF = YES 157 | 158 | # If the QT_AUTOBRIEF tag is set to YES then Doxygen will 159 | # interpret the first line (until the first dot) of a Qt-style 160 | # comment as the brief description. If set to NO, the comments 161 | # will behave just like regular Qt-style comments (thus requiring 162 | # an explicit \brief command for a brief description.) 163 | 164 | QT_AUTOBRIEF = NO 165 | 166 | # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 167 | # treat a multi-line C++ special comment block (i.e. a block of //! or /// 168 | # comments) as a brief description. This used to be the default behaviour. 169 | # The new default is to treat a multi-line C++ comment block as a detailed 170 | # description. Set this tag to YES if you prefer the old behaviour instead. 171 | 172 | MULTILINE_CPP_IS_BRIEF = NO 173 | 174 | # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 175 | # member inherits the documentation from any documented member that it 176 | # re-implements. 177 | 178 | INHERIT_DOCS = YES 179 | 180 | # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 181 | # a new page for each member. If set to NO, the documentation of a member will 182 | # be part of the file/class/namespace that contains it. 183 | 184 | SEPARATE_MEMBER_PAGES = NO 185 | 186 | # The TAB_SIZE tag can be used to set the number of spaces in a tab. 187 | # Doxygen uses this value to replace tabs by spaces in code fragments. 188 | 189 | TAB_SIZE = 2 190 | 191 | # This tag can be used to specify a number of aliases that acts 192 | # as commands in the documentation. An alias has the form "name=value". 193 | # For example adding "sideeffect=\par Side Effects:\n" will allow you to 194 | # put the command \sideeffect (or @sideeffect) in the documentation, which 195 | # will result in a user-defined paragraph with heading "Side Effects:". 196 | # You can put \n's in the value part of an alias to insert newlines. 197 | 198 | ALIASES = "error=\exception" 199 | 200 | # This tag can be used to specify a number of word-keyword mappings (TCL only). 201 | # A mapping has the form "name=value". For example adding 202 | # "class=itcl::class" will allow you to use the command class in the 203 | # itcl::class meaning. 204 | 205 | TCL_SUBST = 206 | 207 | # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 208 | # sources only. Doxygen will then generate output that is more tailored for C. 209 | # For instance, some of the names that are used will be different. The list 210 | # of all members will be omitted, etc. 211 | 212 | OPTIMIZE_OUTPUT_FOR_C = NO 213 | 214 | # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 215 | # sources only. Doxygen will then generate output that is more tailored for 216 | # Java. For instance, namespaces will be presented as packages, qualified 217 | # scopes will look different, etc. 218 | 219 | OPTIMIZE_OUTPUT_JAVA = NO 220 | 221 | # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 222 | # sources only. Doxygen will then generate output that is more tailored for 223 | # Fortran. 224 | 225 | OPTIMIZE_FOR_FORTRAN = NO 226 | 227 | # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 228 | # sources. Doxygen will then generate output that is tailored for 229 | # VHDL. 230 | 231 | OPTIMIZE_OUTPUT_VHDL = NO 232 | 233 | # Doxygen selects the parser to use depending on the extension of the files it 234 | # parses. With this tag you can assign which parser to use for a given 235 | # extension. Doxygen has a built-in mapping, but you can override or extend it 236 | # using this tag. The format is ext=language, where ext is a file extension, 237 | # and language is one of the parsers supported by doxygen: IDL, Java, 238 | # Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, 239 | # C++. For instance to make doxygen treat .inc files as Fortran files (default 240 | # is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note 241 | # that for custom extensions you also need to set FILE_PATTERNS otherwise the 242 | # files are not read by doxygen. 243 | 244 | EXTENSION_MAPPING = 245 | 246 | # If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all 247 | # comments according to the Markdown format, which allows for more readable 248 | # documentation. See http://daringfireball.net/projects/markdown/ for details. 249 | # The output of markdown processing is further processed by doxygen, so you 250 | # can mix doxygen, HTML, and XML commands with Markdown formatting. 251 | # Disable only in case of backward compatibilities issues. 252 | 253 | MARKDOWN_SUPPORT = YES 254 | 255 | # When enabled doxygen tries to link words that correspond to documented classes, 256 | # or namespaces to their corresponding documentation. Such a link can be 257 | # prevented in individual cases by by putting a % sign in front of the word or 258 | # globally by setting AUTOLINK_SUPPORT to NO. 259 | 260 | AUTOLINK_SUPPORT = YES 261 | 262 | # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 263 | # to include (a tag file for) the STL sources as input, then you should 264 | # set this tag to YES in order to let doxygen match functions declarations and 265 | # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 266 | # func(std::string) {}). This also makes the inheritance and collaboration 267 | # diagrams that involve STL classes more complete and accurate. 268 | 269 | BUILTIN_STL_SUPPORT = NO 270 | 271 | # If you use Microsoft's C++/CLI language, you should set this option to YES to 272 | # enable parsing support. 273 | 274 | CPP_CLI_SUPPORT = NO 275 | 276 | # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 277 | # Doxygen will parse them like normal C++ but will assume all classes use public 278 | # instead of private inheritance when no explicit protection keyword is present. 279 | 280 | SIP_SUPPORT = NO 281 | 282 | # For Microsoft's IDL there are propget and propput attributes to indicate 283 | # getter and setter methods for a property. Setting this option to YES (the 284 | # default) will make doxygen replace the get and set methods by a property in 285 | # the documentation. This will only work if the methods are indeed getting or 286 | # setting a simple type. If this is not the case, or you want to show the 287 | # methods anyway, you should set this option to NO. 288 | 289 | IDL_PROPERTY_SUPPORT = YES 290 | 291 | # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 292 | # tag is set to YES, then doxygen will reuse the documentation of the first 293 | # member in the group (if any) for the other members of the group. By default 294 | # all members of a group must be documented explicitly. 295 | 296 | DISTRIBUTE_GROUP_DOC = NO 297 | 298 | # Set the SUBGROUPING tag to YES (the default) to allow class member groups of 299 | # the same type (for instance a group of public functions) to be put as a 300 | # subgroup of that type (e.g. under the Public Functions section). Set it to 301 | # NO to prevent subgrouping. Alternatively, this can be done per class using 302 | # the \nosubgrouping command. 303 | 304 | SUBGROUPING = YES 305 | 306 | # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and 307 | # unions are shown inside the group in which they are included (e.g. using 308 | # @ingroup) instead of on a separate page (for HTML and Man pages) or 309 | # section (for LaTeX and RTF). 310 | 311 | INLINE_GROUPED_CLASSES = NO 312 | 313 | # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and 314 | # unions with only public data fields will be shown inline in the documentation 315 | # of the scope in which they are defined (i.e. file, namespace, or group 316 | # documentation), provided this scope is documented. If set to NO (the default), 317 | # structs, classes, and unions are shown on a separate page (for HTML and Man 318 | # pages) or section (for LaTeX and RTF). 319 | 320 | INLINE_SIMPLE_STRUCTS = NO 321 | 322 | # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 323 | # is documented as struct, union, or enum with the name of the typedef. So 324 | # typedef struct TypeS {} TypeT, will appear in the documentation as a struct 325 | # with name TypeT. When disabled the typedef will appear as a member of a file, 326 | # namespace, or class. And the struct will be named TypeS. This can typically 327 | # be useful for C code in case the coding convention dictates that all compound 328 | # types are typedef'ed and only the typedef is referenced, never the tag name. 329 | 330 | TYPEDEF_HIDES_STRUCT = NO 331 | 332 | # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to 333 | # determine which symbols to keep in memory and which to flush to disk. 334 | # When the cache is full, less often used symbols will be written to disk. 335 | # For small to medium size projects (<1000 input files) the default value is 336 | # probably good enough. For larger projects a too small cache size can cause 337 | # doxygen to be busy swapping symbols to and from disk most of the time 338 | # causing a significant performance penalty. 339 | # If the system has enough physical memory increasing the cache will improve the 340 | # performance by keeping more symbols in memory. Note that the value works on 341 | # a logarithmic scale so increasing the size by one will roughly double the 342 | # memory usage. The cache size is given by this formula: 343 | # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 344 | # corresponding to a cache size of 2^16 = 65536 symbols. 345 | 346 | SYMBOL_CACHE_SIZE = 0 347 | 348 | # Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be 349 | # set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given 350 | # their name and scope. Since this can be an expensive process and often the 351 | # same symbol appear multiple times in the code, doxygen keeps a cache of 352 | # pre-resolved symbols. If the cache is too small doxygen will become slower. 353 | # If the cache is too large, memory is wasted. The cache size is given by this 354 | # formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, 355 | # corresponding to a cache size of 2^16 = 65536 symbols. 356 | 357 | LOOKUP_CACHE_SIZE = 0 358 | 359 | #--------------------------------------------------------------------------- 360 | # Build related configuration options 361 | #--------------------------------------------------------------------------- 362 | 363 | # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 364 | # documentation are documented, even if no documentation was available. 365 | # Private class members and static file members will be hidden unless 366 | # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES 367 | 368 | EXTRACT_ALL = YES 369 | 370 | # If the EXTRACT_PRIVATE tag is set to YES all private members of a class 371 | # will be included in the documentation. 372 | 373 | EXTRACT_PRIVATE = NO 374 | 375 | # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal 376 | # scope will be included in the documentation. 377 | 378 | EXTRACT_PACKAGE = NO 379 | 380 | # If the EXTRACT_STATIC tag is set to YES all static members of a file 381 | # will be included in the documentation. 382 | 383 | EXTRACT_STATIC = NO 384 | 385 | # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 386 | # defined locally in source files will be included in the documentation. 387 | # If set to NO only classes defined in header files are included. 388 | 389 | EXTRACT_LOCAL_CLASSES = NO 390 | 391 | # This flag is only useful for Objective-C code. When set to YES local 392 | # methods, which are defined in the implementation section but not in 393 | # the interface are included in the documentation. 394 | # If set to NO (the default) only methods in the interface are included. 395 | 396 | EXTRACT_LOCAL_METHODS = NO 397 | 398 | # If this flag is set to YES, the members of anonymous namespaces will be 399 | # extracted and appear in the documentation as a namespace called 400 | # 'anonymous_namespace{file}', where file will be replaced with the base 401 | # name of the file that contains the anonymous namespace. By default 402 | # anonymous namespaces are hidden. 403 | 404 | EXTRACT_ANON_NSPACES = NO 405 | 406 | # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 407 | # undocumented members of documented classes, files or namespaces. 408 | # If set to NO (the default) these members will be included in the 409 | # various overviews, but no documentation section is generated. 410 | # This option has no effect if EXTRACT_ALL is enabled. 411 | 412 | HIDE_UNDOC_MEMBERS = NO 413 | 414 | # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 415 | # undocumented classes that are normally visible in the class hierarchy. 416 | # If set to NO (the default) these classes will be included in the various 417 | # overviews. This option has no effect if EXTRACT_ALL is enabled. 418 | 419 | HIDE_UNDOC_CLASSES = NO 420 | 421 | # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 422 | # friend (class|struct|union) declarations. 423 | # If set to NO (the default) these declarations will be included in the 424 | # documentation. 425 | 426 | HIDE_FRIEND_COMPOUNDS = NO 427 | 428 | # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 429 | # documentation blocks found inside the body of a function. 430 | # If set to NO (the default) these blocks will be appended to the 431 | # function's detailed documentation block. 432 | 433 | HIDE_IN_BODY_DOCS = NO 434 | 435 | # The INTERNAL_DOCS tag determines if documentation 436 | # that is typed after a \internal command is included. If the tag is set 437 | # to NO (the default) then the documentation will be excluded. 438 | # Set it to YES to include the internal documentation. 439 | 440 | INTERNAL_DOCS = NO 441 | 442 | # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 443 | # file names in lower-case letters. If set to YES upper-case letters are also 444 | # allowed. This is useful if you have classes or files whose names only differ 445 | # in case and if your file system supports case sensitive file names. Windows 446 | # and Mac users are advised to set this option to NO. 447 | 448 | CASE_SENSE_NAMES = NO 449 | 450 | # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 451 | # will show members with their full class and namespace scopes in the 452 | # documentation. If set to YES the scope will be hidden. 453 | 454 | HIDE_SCOPE_NAMES = NO 455 | 456 | # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 457 | # will put a list of the files that are included by a file in the documentation 458 | # of that file. 459 | 460 | SHOW_INCLUDE_FILES = YES 461 | 462 | # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen 463 | # will list include files with double quotes in the documentation 464 | # rather than with sharp brackets. 465 | 466 | FORCE_LOCAL_INCLUDES = NO 467 | 468 | # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 469 | # is inserted in the documentation for inline members. 470 | 471 | INLINE_INFO = YES 472 | 473 | # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 474 | # will sort the (detailed) documentation of file and class members 475 | # alphabetically by member name. If set to NO the members will appear in 476 | # declaration order. 477 | 478 | SORT_MEMBER_DOCS = YES 479 | 480 | # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 481 | # brief documentation of file, namespace and class members alphabetically 482 | # by member name. If set to NO (the default) the members will appear in 483 | # declaration order. 484 | 485 | SORT_BRIEF_DOCS = NO 486 | 487 | # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen 488 | # will sort the (brief and detailed) documentation of class members so that 489 | # constructors and destructors are listed first. If set to NO (the default) 490 | # the constructors will appear in the respective orders defined by 491 | # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. 492 | # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO 493 | # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. 494 | 495 | SORT_MEMBERS_CTORS_1ST = NO 496 | 497 | # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 498 | # hierarchy of group names into alphabetical order. If set to NO (the default) 499 | # the group names will appear in their defined order. 500 | 501 | SORT_GROUP_NAMES = NO 502 | 503 | # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 504 | # sorted by fully-qualified names, including namespaces. If set to 505 | # NO (the default), the class list will be sorted only by class name, 506 | # not including the namespace part. 507 | # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 508 | # Note: This option applies only to the class list, not to the 509 | # alphabetical list. 510 | 511 | SORT_BY_SCOPE_NAME = NO 512 | 513 | # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to 514 | # do proper type resolution of all parameters of a function it will reject a 515 | # match between the prototype and the implementation of a member function even 516 | # if there is only one candidate or it is obvious which candidate to choose 517 | # by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen 518 | # will still accept a match between prototype and implementation in such cases. 519 | 520 | STRICT_PROTO_MATCHING = NO 521 | 522 | # The GENERATE_TODOLIST tag can be used to enable (YES) or 523 | # disable (NO) the todo list. This list is created by putting \todo 524 | # commands in the documentation. 525 | 526 | GENERATE_TODOLIST = YES 527 | 528 | # The GENERATE_TESTLIST tag can be used to enable (YES) or 529 | # disable (NO) the test list. This list is created by putting \test 530 | # commands in the documentation. 531 | 532 | GENERATE_TESTLIST = YES 533 | 534 | # The GENERATE_BUGLIST tag can be used to enable (YES) or 535 | # disable (NO) the bug list. This list is created by putting \bug 536 | # commands in the documentation. 537 | 538 | GENERATE_BUGLIST = YES 539 | 540 | # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 541 | # disable (NO) the deprecated list. This list is created by putting 542 | # \deprecated commands in the documentation. 543 | 544 | GENERATE_DEPRECATEDLIST= YES 545 | 546 | # The ENABLED_SECTIONS tag can be used to enable conditional 547 | # documentation sections, marked by \if section-label ... \endif 548 | # and \cond section-label ... \endcond blocks. 549 | 550 | ENABLED_SECTIONS = 551 | 552 | # The MAX_INITIALIZER_LINES tag determines the maximum number of lines 553 | # the initial value of a variable or macro consists of for it to appear in 554 | # the documentation. If the initializer consists of more lines than specified 555 | # here it will be hidden. Use a value of 0 to hide initializers completely. 556 | # The appearance of the initializer of individual variables and macros in the 557 | # documentation can be controlled using \showinitializer or \hideinitializer 558 | # command in the documentation regardless of this setting. 559 | 560 | MAX_INITIALIZER_LINES = 30 561 | 562 | # Set the SHOW_USED_FILES tag to NO to disable the list of files generated 563 | # at the bottom of the documentation of classes and structs. If set to YES the 564 | # list will mention the files that were used to generate the documentation. 565 | 566 | SHOW_USED_FILES = YES 567 | 568 | # Set the SHOW_FILES tag to NO to disable the generation of the Files page. 569 | # This will remove the Files entry from the Quick Index and from the 570 | # Folder Tree View (if specified). The default is YES. 571 | 572 | SHOW_FILES = YES 573 | 574 | # Set the SHOW_NAMESPACES tag to NO to disable the generation of the 575 | # Namespaces page. 576 | # This will remove the Namespaces entry from the Quick Index 577 | # and from the Folder Tree View (if specified). The default is YES. 578 | 579 | SHOW_NAMESPACES = YES 580 | 581 | # The FILE_VERSION_FILTER tag can be used to specify a program or script that 582 | # doxygen should invoke to get the current version for each file (typically from 583 | # the version control system). Doxygen will invoke the program by executing (via 584 | # popen()) the command , where is the value of 585 | # the FILE_VERSION_FILTER tag, and is the name of an input file 586 | # provided by doxygen. Whatever the program writes to standard output 587 | # is used as the file version. See the manual for examples. 588 | 589 | FILE_VERSION_FILTER = 590 | 591 | # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed 592 | # by doxygen. The layout file controls the global structure of the generated 593 | # output files in an output format independent way. To create the layout file 594 | # that represents doxygen's defaults, run doxygen with the -l option. 595 | # You can optionally specify a file name after the option, if omitted 596 | # DoxygenLayout.xml will be used as the name of the layout file. 597 | 598 | LAYOUT_FILE = 599 | 600 | # The CITE_BIB_FILES tag can be used to specify one or more bib files 601 | # containing the references data. This must be a list of .bib files. The 602 | # .bib extension is automatically appended if omitted. Using this command 603 | # requires the bibtex tool to be installed. See also 604 | # http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style 605 | # of the bibliography can be controlled using LATEX_BIB_STYLE. To use this 606 | # feature you need bibtex and perl available in the search path. Do not use 607 | # file names with spaces, bibtex cannot handle them. 608 | 609 | CITE_BIB_FILES = 610 | 611 | #--------------------------------------------------------------------------- 612 | # configuration options related to warning and progress messages 613 | #--------------------------------------------------------------------------- 614 | 615 | # The QUIET tag can be used to turn on/off the messages that are generated 616 | # by doxygen. Possible values are YES and NO. If left blank NO is used. 617 | 618 | QUIET = YES 619 | 620 | # The WARNINGS tag can be used to turn on/off the warning messages that are 621 | # generated by doxygen. Possible values are YES and NO. If left blank 622 | # NO is used. 623 | 624 | WARNINGS = YES 625 | 626 | # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 627 | # for undocumented members. If EXTRACT_ALL is set to YES then this flag will 628 | # automatically be disabled. 629 | 630 | WARN_IF_UNDOCUMENTED = YES 631 | 632 | # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 633 | # potential errors in the documentation, such as not documenting some 634 | # parameters in a documented function, or documenting parameters that 635 | # don't exist or using markup commands wrongly. 636 | 637 | WARN_IF_DOC_ERROR = YES 638 | 639 | # The WARN_NO_PARAMDOC option can be enabled to get warnings for 640 | # functions that are documented, but have no documentation for their parameters 641 | # or return value. If set to NO (the default) doxygen will only warn about 642 | # wrong or incomplete parameter documentation, but not about the absence of 643 | # documentation. 644 | 645 | WARN_NO_PARAMDOC = YES 646 | 647 | # The WARN_FORMAT tag determines the format of the warning messages that 648 | # doxygen can produce. The string should contain the $file, $line, and $text 649 | # tags, which will be replaced by the file and line number from which the 650 | # warning originated and the warning text. Optionally the format may contain 651 | # $version, which will be replaced by the version of the file (if it could 652 | # be obtained via FILE_VERSION_FILTER) 653 | 654 | WARN_FORMAT = "$file:$line: $text" 655 | 656 | # The WARN_LOGFILE tag can be used to specify a file to which warning 657 | # and error messages should be written. If left blank the output is written 658 | # to stderr. 659 | 660 | WARN_LOGFILE = 661 | 662 | #--------------------------------------------------------------------------- 663 | # configuration options related to the input files 664 | #--------------------------------------------------------------------------- 665 | 666 | # The INPUT tag can be used to specify the files and/or directories that contain 667 | # documented source files. You may enter file names like "myfile.cpp" or 668 | # directories like "/usr/src/myproject". Separate the files or directories 669 | # with spaces. 670 | 671 | INPUT = doc/doxygen/mainpage.h src/rfc.h src/rfc 672 | 673 | # This tag can be used to specify the character encoding of the source files 674 | # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 675 | # also the default input encoding. Doxygen uses libiconv (or the iconv built 676 | # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 677 | # the list of possible encodings. 678 | 679 | INPUT_ENCODING = UTF-8 680 | 681 | # If the value of the INPUT tag contains directories, you can use the 682 | # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 683 | # and *.h) to filter out the source-files in the directories. If left 684 | # blank the following patterns are tested: 685 | # *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh 686 | # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py 687 | # *.f90 *.f *.for *.vhd *.vhdl 688 | 689 | FILE_PATTERNS = *.h 690 | 691 | # The RECURSIVE tag can be used to turn specify whether or not subdirectories 692 | # should be searched for input files as well. Possible values are YES and NO. 693 | # If left blank NO is used. 694 | 695 | RECURSIVE = YES 696 | 697 | # The EXCLUDE tag can be used to specify files and/or directories that should be 698 | # excluded from the INPUT source files. This way you can easily exclude a 699 | # subdirectory from a directory tree whose root is specified with the INPUT tag. 700 | # Note that relative paths are relative to the directory from which doxygen is 701 | # run. 702 | 703 | EXCLUDE = 704 | 705 | # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or 706 | # directories that are symbolic links (a Unix file system feature) are excluded 707 | # from the input. 708 | 709 | EXCLUDE_SYMLINKS = NO 710 | 711 | # If the value of the INPUT tag contains directories, you can use the 712 | # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 713 | # certain files from those directories. Note that the wildcards are matched 714 | # against the file with absolute path, so to exclude all test directories 715 | # for example use the pattern */test/* 716 | 717 | EXCLUDE_PATTERNS = */src/rfc/prelude.h 718 | 719 | # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 720 | # (namespaces, classes, functions, etc.) that should be excluded from the 721 | # output. The symbol name can be a fully qualified name, a word, or if the 722 | # wildcard * is used, a substring. Examples: ANamespace, AClass, 723 | # AClass::ANamespace, ANamespace::*Test 724 | 725 | EXCLUDE_SYMBOLS = 726 | 727 | # The EXAMPLE_PATH tag can be used to specify one or more files or 728 | # directories that contain example code fragments that are included (see 729 | # the \include command). 730 | 731 | EXAMPLE_PATH = doc/examples 732 | 733 | # If the value of the EXAMPLE_PATH tag contains directories, you can use the 734 | # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 735 | # and *.h) to filter out the source-files in the directories. If left 736 | # blank all files are included. 737 | 738 | EXAMPLE_PATTERNS = 739 | 740 | # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 741 | # searched for input files to be used with the \include or \dontinclude 742 | # commands irrespective of the value of the RECURSIVE tag. 743 | # Possible values are YES and NO. If left blank NO is used. 744 | 745 | EXAMPLE_RECURSIVE = NO 746 | 747 | # The IMAGE_PATH tag can be used to specify one or more files or 748 | # directories that contain image that are included in the documentation (see 749 | # the \image command). 750 | 751 | IMAGE_PATH = 752 | 753 | # The INPUT_FILTER tag can be used to specify a program that doxygen should 754 | # invoke to filter for each input file. Doxygen will invoke the filter program 755 | # by executing (via popen()) the command , where 756 | # is the value of the INPUT_FILTER tag, and is the name of an 757 | # input file. Doxygen will then use the output that the filter program writes 758 | # to standard output. 759 | # If FILTER_PATTERNS is specified, this tag will be 760 | # ignored. 761 | 762 | INPUT_FILTER = 763 | 764 | # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 765 | # basis. 766 | # Doxygen will compare the file name with each pattern and apply the 767 | # filter if there is a match. 768 | # The filters are a list of the form: 769 | # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 770 | # info on how filters are used. If FILTER_PATTERNS is empty or if 771 | # non of the patterns match the file name, INPUT_FILTER is applied. 772 | 773 | FILTER_PATTERNS = 774 | 775 | # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 776 | # INPUT_FILTER) will be used to filter the input files when producing source 777 | # files to browse (i.e. when SOURCE_BROWSER is set to YES). 778 | 779 | FILTER_SOURCE_FILES = NO 780 | 781 | # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file 782 | # pattern. A pattern will override the setting for FILTER_PATTERN (if any) 783 | # and it is also possible to disable source filtering for a specific pattern 784 | # using *.ext= (so without naming a filter). This option only has effect when 785 | # FILTER_SOURCE_FILES is enabled. 786 | 787 | FILTER_SOURCE_PATTERNS = 788 | 789 | # If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that 790 | # is part of the input, its contents will be placed on the main page (index.html). 791 | # This can be useful if you have a project on for instance GitHub and want reuse 792 | # the introduction page also for the doxygen output. 793 | 794 | USE_MDFILE_AS_MAINPAGE = 795 | 796 | #--------------------------------------------------------------------------- 797 | # configuration options related to source browsing 798 | #--------------------------------------------------------------------------- 799 | 800 | # If the SOURCE_BROWSER tag is set to YES then a list of source files will 801 | # be generated. Documented entities will be cross-referenced with these sources. 802 | # Note: To get rid of all source code in the generated output, make sure also 803 | # VERBATIM_HEADERS is set to NO. 804 | 805 | SOURCE_BROWSER = NO 806 | 807 | # Setting the INLINE_SOURCES tag to YES will include the body 808 | # of functions and classes directly in the documentation. 809 | 810 | INLINE_SOURCES = NO 811 | 812 | # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 813 | # doxygen to hide any special comment blocks from generated source code 814 | # fragments. Normal C, C++ and Fortran comments will always remain visible. 815 | 816 | STRIP_CODE_COMMENTS = YES 817 | 818 | # If the REFERENCED_BY_RELATION tag is set to YES 819 | # then for each documented function all documented 820 | # functions referencing it will be listed. 821 | 822 | REFERENCED_BY_RELATION = NO 823 | 824 | # If the REFERENCES_RELATION tag is set to YES 825 | # then for each documented function all documented entities 826 | # called/used by that function will be listed. 827 | 828 | REFERENCES_RELATION = NO 829 | 830 | # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 831 | # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 832 | # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 833 | # link to the source code. 834 | # Otherwise they will link to the documentation. 835 | 836 | REFERENCES_LINK_SOURCE = YES 837 | 838 | # If the USE_HTAGS tag is set to YES then the references to source code 839 | # will point to the HTML generated by the htags(1) tool instead of doxygen 840 | # built-in source browser. The htags tool is part of GNU's global source 841 | # tagging system (see http://www.gnu.org/software/global/global.html). You 842 | # will need version 4.8.6 or higher. 843 | 844 | USE_HTAGS = NO 845 | 846 | # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 847 | # will generate a verbatim copy of the header file for each class for 848 | # which an include is specified. Set to NO to disable this. 849 | 850 | VERBATIM_HEADERS = YES 851 | 852 | #--------------------------------------------------------------------------- 853 | # configuration options related to the alphabetical class index 854 | #--------------------------------------------------------------------------- 855 | 856 | # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 857 | # of all compounds will be generated. Enable this if the project 858 | # contains a lot of classes, structs, unions or interfaces. 859 | 860 | ALPHABETICAL_INDEX = YES 861 | 862 | # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 863 | # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 864 | # in which this list will be split (can be a number in the range [1..20]) 865 | 866 | COLS_IN_ALPHA_INDEX = 5 867 | 868 | # In case all classes in a project start with a common prefix, all 869 | # classes will be put under the same header in the alphabetical index. 870 | # The IGNORE_PREFIX tag can be used to specify one or more prefixes that 871 | # should be ignored while generating the index headers. 872 | 873 | IGNORE_PREFIX = 874 | 875 | #--------------------------------------------------------------------------- 876 | # configuration options related to the HTML output 877 | #--------------------------------------------------------------------------- 878 | 879 | # If the GENERATE_HTML tag is set to YES (the default) Doxygen will 880 | # generate HTML output. 881 | 882 | GENERATE_HTML = YES 883 | 884 | # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 885 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 886 | # put in front of it. If left blank `html' will be used as the default path. 887 | 888 | HTML_OUTPUT = html 889 | 890 | # The HTML_FILE_EXTENSION tag can be used to specify the file extension for 891 | # each generated HTML page (for example: .htm,.php,.asp). If it is left blank 892 | # doxygen will generate files with .html extension. 893 | 894 | HTML_FILE_EXTENSION = .html 895 | 896 | # The HTML_HEADER tag can be used to specify a personal HTML header for 897 | # each generated HTML page. If it is left blank doxygen will generate a 898 | # standard header. Note that when using a custom header you are responsible 899 | # for the proper inclusion of any scripts and style sheets that doxygen 900 | # needs, which is dependent on the configuration options used. 901 | # It is advised to generate a default header using "doxygen -w html 902 | # header.html footer.html stylesheet.css YourConfigFile" and then modify 903 | # that header. Note that the header is subject to change so you typically 904 | # have to redo this when upgrading to a newer version of doxygen or when 905 | # changing the value of configuration settings such as GENERATE_TREEVIEW! 906 | 907 | HTML_HEADER = 908 | 909 | # The HTML_FOOTER tag can be used to specify a personal HTML footer for 910 | # each generated HTML page. If it is left blank doxygen will generate a 911 | # standard footer. 912 | 913 | HTML_FOOTER = 914 | 915 | # The HTML_STYLESHEET tag can be used to specify a user-defined cascading 916 | # style sheet that is used by each HTML page. It can be used to 917 | # fine-tune the look of the HTML output. If left blank doxygen will 918 | # generate a default style sheet. Note that it is recommended to use 919 | # HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this 920 | # tag will in the future become obsolete. 921 | 922 | HTML_STYLESHEET = 923 | 924 | # The HTML_EXTRA_STYLESHEET tag can be used to specify an additional 925 | # user-defined cascading style sheet that is included after the standard 926 | # style sheets created by doxygen. Using this option one can overrule 927 | # certain style aspects. This is preferred over using HTML_STYLESHEET 928 | # since it does not replace the standard style sheet and is therefor more 929 | # robust against future updates. Doxygen will copy the style sheet file to 930 | # the output directory. 931 | 932 | HTML_EXTRA_STYLESHEET = 933 | 934 | # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or 935 | # other source files which should be copied to the HTML output directory. Note 936 | # that these files will be copied to the base HTML output directory. Use the 937 | # $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these 938 | # files. In the HTML_STYLESHEET file, use the file name only. Also note that 939 | # the files will be copied as-is; there are no commands or markers available. 940 | 941 | HTML_EXTRA_FILES = 942 | 943 | # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. 944 | # Doxygen will adjust the colors in the style sheet and background images 945 | # according to this color. Hue is specified as an angle on a colorwheel, 946 | # see http://en.wikipedia.org/wiki/Hue for more information. 947 | # For instance the value 0 represents red, 60 is yellow, 120 is green, 948 | # 180 is cyan, 240 is blue, 300 purple, and 360 is red again. 949 | # The allowed range is 0 to 359. 950 | 951 | HTML_COLORSTYLE_HUE = 220 952 | 953 | # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of 954 | # the colors in the HTML output. For a value of 0 the output will use 955 | # grayscales only. A value of 255 will produce the most vivid colors. 956 | 957 | HTML_COLORSTYLE_SAT = 100 958 | 959 | # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to 960 | # the luminance component of the colors in the HTML output. Values below 961 | # 100 gradually make the output lighter, whereas values above 100 make 962 | # the output darker. The value divided by 100 is the actual gamma applied, 963 | # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, 964 | # and 100 does not change the gamma. 965 | 966 | HTML_COLORSTYLE_GAMMA = 80 967 | 968 | # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML 969 | # page will contain the date and time when the page was generated. Setting 970 | # this to NO can help when comparing the output of multiple runs. 971 | 972 | HTML_TIMESTAMP = YES 973 | 974 | # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 975 | # documentation will contain sections that can be hidden and shown after the 976 | # page has loaded. 977 | 978 | HTML_DYNAMIC_SECTIONS = NO 979 | 980 | # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of 981 | # entries shown in the various tree structured indices initially; the user 982 | # can expand and collapse entries dynamically later on. Doxygen will expand 983 | # the tree to such a level that at most the specified number of entries are 984 | # visible (unless a fully collapsed tree already exceeds this amount). 985 | # So setting the number of entries 1 will produce a full collapsed tree by 986 | # default. 0 is a special value representing an infinite number of entries 987 | # and will result in a full expanded tree by default. 988 | 989 | HTML_INDEX_NUM_ENTRIES = 100 990 | 991 | # If the GENERATE_DOCSET tag is set to YES, additional index files 992 | # will be generated that can be used as input for Apple's Xcode 3 993 | # integrated development environment, introduced with OSX 10.5 (Leopard). 994 | # To create a documentation set, doxygen will generate a Makefile in the 995 | # HTML output directory. Running make will produce the docset in that 996 | # directory and running "make install" will install the docset in 997 | # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 998 | # it at startup. 999 | # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html 1000 | # for more information. 1001 | 1002 | GENERATE_DOCSET = NO 1003 | 1004 | # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 1005 | # feed. A documentation feed provides an umbrella under which multiple 1006 | # documentation sets from a single provider (such as a company or product suite) 1007 | # can be grouped. 1008 | 1009 | DOCSET_FEEDNAME = "Doxygen generated docs" 1010 | 1011 | # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 1012 | # should uniquely identify the documentation set bundle. This should be a 1013 | # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 1014 | # will append .docset to the name. 1015 | 1016 | DOCSET_BUNDLE_ID = org.doxygen.Project 1017 | 1018 | # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely 1019 | # identify the documentation publisher. This should be a reverse domain-name 1020 | # style string, e.g. com.mycompany.MyDocSet.documentation. 1021 | 1022 | DOCSET_PUBLISHER_ID = org.doxygen.Publisher 1023 | 1024 | # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. 1025 | 1026 | DOCSET_PUBLISHER_NAME = Publisher 1027 | 1028 | # If the GENERATE_HTMLHELP tag is set to YES, additional index files 1029 | # will be generated that can be used as input for tools like the 1030 | # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 1031 | # of the generated HTML documentation. 1032 | 1033 | GENERATE_HTMLHELP = NO 1034 | 1035 | # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 1036 | # be used to specify the file name of the resulting .chm file. You 1037 | # can add a path in front of the file if the result should not be 1038 | # written to the html output directory. 1039 | 1040 | CHM_FILE = 1041 | 1042 | # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 1043 | # be used to specify the location (absolute path including file name) of 1044 | # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 1045 | # the HTML help compiler on the generated index.hhp. 1046 | 1047 | HHC_LOCATION = 1048 | 1049 | # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 1050 | # controls if a separate .chi index file is generated (YES) or that 1051 | # it should be included in the master .chm file (NO). 1052 | 1053 | GENERATE_CHI = NO 1054 | 1055 | # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING 1056 | # is used to encode HtmlHelp index (hhk), content (hhc) and project file 1057 | # content. 1058 | 1059 | CHM_INDEX_ENCODING = 1060 | 1061 | # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 1062 | # controls whether a binary table of contents is generated (YES) or a 1063 | # normal table of contents (NO) in the .chm file. 1064 | 1065 | BINARY_TOC = NO 1066 | 1067 | # The TOC_EXPAND flag can be set to YES to add extra items for group members 1068 | # to the contents of the HTML help documentation and to the tree view. 1069 | 1070 | TOC_EXPAND = NO 1071 | 1072 | # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and 1073 | # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated 1074 | # that can be used as input for Qt's qhelpgenerator to generate a 1075 | # Qt Compressed Help (.qch) of the generated HTML documentation. 1076 | 1077 | GENERATE_QHP = NO 1078 | 1079 | # If the QHG_LOCATION tag is specified, the QCH_FILE tag can 1080 | # be used to specify the file name of the resulting .qch file. 1081 | # The path specified is relative to the HTML output folder. 1082 | 1083 | QCH_FILE = 1084 | 1085 | # The QHP_NAMESPACE tag specifies the namespace to use when generating 1086 | # Qt Help Project output. For more information please see 1087 | # http://doc.trolltech.com/qthelpproject.html#namespace 1088 | 1089 | QHP_NAMESPACE = org.doxygen.Project 1090 | 1091 | # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating 1092 | # Qt Help Project output. For more information please see 1093 | # http://doc.trolltech.com/qthelpproject.html#virtual-folders 1094 | 1095 | QHP_VIRTUAL_FOLDER = doc 1096 | 1097 | # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to 1098 | # add. For more information please see 1099 | # http://doc.trolltech.com/qthelpproject.html#custom-filters 1100 | 1101 | QHP_CUST_FILTER_NAME = 1102 | 1103 | # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the 1104 | # custom filter to add. For more information please see 1105 | # 1106 | # Qt Help Project / Custom Filters. 1107 | 1108 | QHP_CUST_FILTER_ATTRS = 1109 | 1110 | # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this 1111 | # project's 1112 | # filter section matches. 1113 | # 1114 | # Qt Help Project / Filter Attributes. 1115 | 1116 | QHP_SECT_FILTER_ATTRS = 1117 | 1118 | # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 1119 | # be used to specify the location of Qt's qhelpgenerator. 1120 | # If non-empty doxygen will try to run qhelpgenerator on the generated 1121 | # .qhp file. 1122 | 1123 | QHG_LOCATION = 1124 | 1125 | # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files 1126 | # will be generated, which together with the HTML files, form an Eclipse help 1127 | # plugin. To install this plugin and make it available under the help contents 1128 | # menu in Eclipse, the contents of the directory containing the HTML and XML 1129 | # files needs to be copied into the plugins directory of eclipse. The name of 1130 | # the directory within the plugins directory should be the same as 1131 | # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before 1132 | # the help appears. 1133 | 1134 | GENERATE_ECLIPSEHELP = NO 1135 | 1136 | # A unique identifier for the eclipse help plugin. When installing the plugin 1137 | # the directory name containing the HTML and XML files should also have 1138 | # this name. 1139 | 1140 | ECLIPSE_DOC_ID = org.doxygen.Project 1141 | 1142 | # The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) 1143 | # at top of each HTML page. The value NO (the default) enables the index and 1144 | # the value YES disables it. Since the tabs have the same information as the 1145 | # navigation tree you can set this option to NO if you already set 1146 | # GENERATE_TREEVIEW to YES. 1147 | 1148 | DISABLE_INDEX = NO 1149 | 1150 | # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 1151 | # structure should be generated to display hierarchical information. 1152 | # If the tag value is set to YES, a side panel will be generated 1153 | # containing a tree-like index structure (just like the one that 1154 | # is generated for HTML Help). For this to work a browser that supports 1155 | # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). 1156 | # Windows users are probably better off using the HTML help feature. 1157 | # Since the tree basically has the same information as the tab index you 1158 | # could consider to set DISABLE_INDEX to NO when enabling this option. 1159 | 1160 | GENERATE_TREEVIEW = NO 1161 | 1162 | # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values 1163 | # (range [0,1..20]) that doxygen will group on one line in the generated HTML 1164 | # documentation. Note that a value of 0 will completely suppress the enum 1165 | # values from appearing in the overview section. 1166 | 1167 | ENUM_VALUES_PER_LINE = 4 1168 | 1169 | # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 1170 | # used to set the initial width (in pixels) of the frame in which the tree 1171 | # is shown. 1172 | 1173 | TREEVIEW_WIDTH = 250 1174 | 1175 | # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open 1176 | # links to external symbols imported via tag files in a separate window. 1177 | 1178 | EXT_LINKS_IN_WINDOW = NO 1179 | 1180 | # Use this tag to change the font size of Latex formulas included 1181 | # as images in the HTML documentation. The default is 10. Note that 1182 | # when you change the font size after a successful doxygen run you need 1183 | # to manually remove any form_*.png images from the HTML output directory 1184 | # to force them to be regenerated. 1185 | 1186 | FORMULA_FONTSIZE = 10 1187 | 1188 | # Use the FORMULA_TRANPARENT tag to determine whether or not the images 1189 | # generated for formulas are transparent PNGs. Transparent PNGs are 1190 | # not supported properly for IE 6.0, but are supported on all modern browsers. 1191 | # Note that when changing this option you need to delete any form_*.png files 1192 | # in the HTML output before the changes have effect. 1193 | 1194 | FORMULA_TRANSPARENT = YES 1195 | 1196 | # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax 1197 | # (see http://www.mathjax.org) which uses client side Javascript for the 1198 | # rendering instead of using prerendered bitmaps. Use this if you do not 1199 | # have LaTeX installed or if you want to formulas look prettier in the HTML 1200 | # output. When enabled you may also need to install MathJax separately and 1201 | # configure the path to it using the MATHJAX_RELPATH option. 1202 | 1203 | USE_MATHJAX = NO 1204 | 1205 | # When MathJax is enabled you can set the default output format to be used for 1206 | # thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and 1207 | # SVG. The default value is HTML-CSS, which is slower, but has the best 1208 | # compatibility. 1209 | 1210 | MATHJAX_FORMAT = HTML-CSS 1211 | 1212 | # When MathJax is enabled you need to specify the location relative to the 1213 | # HTML output directory using the MATHJAX_RELPATH option. The destination 1214 | # directory should contain the MathJax.js script. For instance, if the mathjax 1215 | # directory is located at the same level as the HTML output directory, then 1216 | # MATHJAX_RELPATH should be ../mathjax. The default value points to 1217 | # the MathJax Content Delivery Network so you can quickly see the result without 1218 | # installing MathJax. 1219 | # However, it is strongly recommended to install a local 1220 | # copy of MathJax from http://www.mathjax.org before deployment. 1221 | 1222 | MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest 1223 | 1224 | # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension 1225 | # names that should be enabled during MathJax rendering. 1226 | 1227 | MATHJAX_EXTENSIONS = 1228 | 1229 | # When the SEARCHENGINE tag is enabled doxygen will generate a search box 1230 | # for the HTML output. The underlying search engine uses javascript 1231 | # and DHTML and should work on any modern browser. Note that when using 1232 | # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets 1233 | # (GENERATE_DOCSET) there is already a search function so this one should 1234 | # typically be disabled. For large projects the javascript based search engine 1235 | # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. 1236 | 1237 | SEARCHENGINE = YES 1238 | 1239 | # When the SERVER_BASED_SEARCH tag is enabled the search engine will be 1240 | # implemented using a web server instead of a web client using Javascript. 1241 | # There are two flavours of web server based search depending on the 1242 | # EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for 1243 | # searching and an index file used by the script. When EXTERNAL_SEARCH is 1244 | # enabled the indexing and searching needs to be provided by external tools. 1245 | # See the manual for details. 1246 | 1247 | SERVER_BASED_SEARCH = NO 1248 | 1249 | # When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP 1250 | # script for searching. Instead the search results are written to an XML file 1251 | # which needs to be processed by an external indexer. Doxygen will invoke an 1252 | # external search engine pointed to by the SEARCHENGINE_URL option to obtain 1253 | # the search results. Doxygen ships with an example indexer (doxyindexer) and 1254 | # search engine (doxysearch.cgi) which are based on the open source search engine 1255 | # library Xapian. See the manual for configuration details. 1256 | 1257 | EXTERNAL_SEARCH = NO 1258 | 1259 | # The SEARCHENGINE_URL should point to a search engine hosted by a web server 1260 | # which will returned the search results when EXTERNAL_SEARCH is enabled. 1261 | # Doxygen ships with an example search engine (doxysearch) which is based on 1262 | # the open source search engine library Xapian. See the manual for configuration 1263 | # details. 1264 | 1265 | SEARCHENGINE_URL = 1266 | 1267 | # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed 1268 | # search data is written to a file for indexing by an external tool. With the 1269 | # SEARCHDATA_FILE tag the name of this file can be specified. 1270 | 1271 | SEARCHDATA_FILE = searchdata.xml 1272 | 1273 | # When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the 1274 | # EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is 1275 | # useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple 1276 | # projects and redirect the results back to the right project. 1277 | 1278 | EXTERNAL_SEARCH_ID = 1279 | 1280 | # The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen 1281 | # projects other than the one defined by this configuration file, but that are 1282 | # all added to the same external search index. Each project needs to have a 1283 | # unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id 1284 | # of to a relative location where the documentation can be found. 1285 | # The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ... 1286 | 1287 | EXTRA_SEARCH_MAPPINGS = 1288 | 1289 | #--------------------------------------------------------------------------- 1290 | # configuration options related to the LaTeX output 1291 | #--------------------------------------------------------------------------- 1292 | 1293 | # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 1294 | # generate Latex output. 1295 | 1296 | GENERATE_LATEX = NO 1297 | 1298 | # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 1299 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 1300 | # put in front of it. If left blank `latex' will be used as the default path. 1301 | 1302 | LATEX_OUTPUT = latex 1303 | 1304 | # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 1305 | # invoked. If left blank `latex' will be used as the default command name. 1306 | # Note that when enabling USE_PDFLATEX this option is only used for 1307 | # generating bitmaps for formulas in the HTML output, but not in the 1308 | # Makefile that is written to the output directory. 1309 | 1310 | LATEX_CMD_NAME = latex 1311 | 1312 | # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 1313 | # generate index for LaTeX. If left blank `makeindex' will be used as the 1314 | # default command name. 1315 | 1316 | MAKEINDEX_CMD_NAME = makeindex 1317 | 1318 | # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 1319 | # LaTeX documents. This may be useful for small projects and may help to 1320 | # save some trees in general. 1321 | 1322 | COMPACT_LATEX = NO 1323 | 1324 | # The PAPER_TYPE tag can be used to set the paper type that is used 1325 | # by the printer. Possible values are: a4, letter, legal and 1326 | # executive. If left blank a4wide will be used. 1327 | 1328 | PAPER_TYPE = a4 1329 | 1330 | # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 1331 | # packages that should be included in the LaTeX output. 1332 | 1333 | EXTRA_PACKAGES = 1334 | 1335 | # The LATEX_HEADER tag can be used to specify a personal LaTeX header for 1336 | # the generated latex document. The header should contain everything until 1337 | # the first chapter. If it is left blank doxygen will generate a 1338 | # standard header. Notice: only use this tag if you know what you are doing! 1339 | 1340 | LATEX_HEADER = 1341 | 1342 | # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for 1343 | # the generated latex document. The footer should contain everything after 1344 | # the last chapter. If it is left blank doxygen will generate a 1345 | # standard footer. Notice: only use this tag if you know what you are doing! 1346 | 1347 | LATEX_FOOTER = 1348 | 1349 | # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 1350 | # is prepared for conversion to pdf (using ps2pdf). The pdf file will 1351 | # contain links (just like the HTML output) instead of page references 1352 | # This makes the output suitable for online browsing using a pdf viewer. 1353 | 1354 | PDF_HYPERLINKS = YES 1355 | 1356 | # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 1357 | # plain latex in the generated Makefile. Set this option to YES to get a 1358 | # higher quality PDF documentation. 1359 | 1360 | USE_PDFLATEX = YES 1361 | 1362 | # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 1363 | # command to the generated LaTeX files. This will instruct LaTeX to keep 1364 | # running if errors occur, instead of asking the user for help. 1365 | # This option is also used when generating formulas in HTML. 1366 | 1367 | LATEX_BATCHMODE = NO 1368 | 1369 | # If LATEX_HIDE_INDICES is set to YES then doxygen will not 1370 | # include the index chapters (such as File Index, Compound Index, etc.) 1371 | # in the output. 1372 | 1373 | LATEX_HIDE_INDICES = NO 1374 | 1375 | # If LATEX_SOURCE_CODE is set to YES then doxygen will include 1376 | # source code with syntax highlighting in the LaTeX output. 1377 | # Note that which sources are shown also depends on other settings 1378 | # such as SOURCE_BROWSER. 1379 | 1380 | LATEX_SOURCE_CODE = NO 1381 | 1382 | # The LATEX_BIB_STYLE tag can be used to specify the style to use for the 1383 | # bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See 1384 | # http://en.wikipedia.org/wiki/BibTeX for more info. 1385 | 1386 | LATEX_BIB_STYLE = plain 1387 | 1388 | #--------------------------------------------------------------------------- 1389 | # configuration options related to the RTF output 1390 | #--------------------------------------------------------------------------- 1391 | 1392 | # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 1393 | # The RTF output is optimized for Word 97 and may not look very pretty with 1394 | # other RTF readers or editors. 1395 | 1396 | GENERATE_RTF = NO 1397 | 1398 | # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 1399 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 1400 | # put in front of it. If left blank `rtf' will be used as the default path. 1401 | 1402 | RTF_OUTPUT = rtf 1403 | 1404 | # If the COMPACT_RTF tag is set to YES Doxygen generates more compact 1405 | # RTF documents. This may be useful for small projects and may help to 1406 | # save some trees in general. 1407 | 1408 | COMPACT_RTF = NO 1409 | 1410 | # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 1411 | # will contain hyperlink fields. The RTF file will 1412 | # contain links (just like the HTML output) instead of page references. 1413 | # This makes the output suitable for online browsing using WORD or other 1414 | # programs which support those fields. 1415 | # Note: wordpad (write) and others do not support links. 1416 | 1417 | RTF_HYPERLINKS = NO 1418 | 1419 | # Load style sheet definitions from file. Syntax is similar to doxygen's 1420 | # config file, i.e. a series of assignments. You only have to provide 1421 | # replacements, missing definitions are set to their default value. 1422 | 1423 | RTF_STYLESHEET_FILE = 1424 | 1425 | # Set optional variables used in the generation of an rtf document. 1426 | # Syntax is similar to doxygen's config file. 1427 | 1428 | RTF_EXTENSIONS_FILE = 1429 | 1430 | #--------------------------------------------------------------------------- 1431 | # configuration options related to the man page output 1432 | #--------------------------------------------------------------------------- 1433 | 1434 | # If the GENERATE_MAN tag is set to YES (the default) Doxygen will 1435 | # generate man pages 1436 | 1437 | GENERATE_MAN = NO 1438 | 1439 | # The MAN_OUTPUT tag is used to specify where the man pages will be put. 1440 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 1441 | # put in front of it. If left blank `man' will be used as the default path. 1442 | 1443 | MAN_OUTPUT = man 1444 | 1445 | # The MAN_EXTENSION tag determines the extension that is added to 1446 | # the generated man pages (default is the subroutine's section .3) 1447 | 1448 | MAN_EXTENSION = .3 1449 | 1450 | # If the MAN_LINKS tag is set to YES and Doxygen generates man output, 1451 | # then it will generate one additional man file for each entity 1452 | # documented in the real man page(s). These additional files 1453 | # only source the real man page, but without them the man command 1454 | # would be unable to find the correct page. The default is NO. 1455 | 1456 | MAN_LINKS = NO 1457 | 1458 | #--------------------------------------------------------------------------- 1459 | # configuration options related to the XML output 1460 | #--------------------------------------------------------------------------- 1461 | 1462 | # If the GENERATE_XML tag is set to YES Doxygen will 1463 | # generate an XML file that captures the structure of 1464 | # the code including all documentation. 1465 | 1466 | GENERATE_XML = NO 1467 | 1468 | # The XML_OUTPUT tag is used to specify where the XML pages will be put. 1469 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 1470 | # put in front of it. If left blank `xml' will be used as the default path. 1471 | 1472 | XML_OUTPUT = xml 1473 | 1474 | # The XML_SCHEMA tag can be used to specify an XML schema, 1475 | # which can be used by a validating XML parser to check the 1476 | # syntax of the XML files. 1477 | 1478 | XML_SCHEMA = 1479 | 1480 | # The XML_DTD tag can be used to specify an XML DTD, 1481 | # which can be used by a validating XML parser to check the 1482 | # syntax of the XML files. 1483 | 1484 | XML_DTD = 1485 | 1486 | # If the XML_PROGRAMLISTING tag is set to YES Doxygen will 1487 | # dump the program listings (including syntax highlighting 1488 | # and cross-referencing information) to the XML output. Note that 1489 | # enabling this will significantly increase the size of the XML output. 1490 | 1491 | XML_PROGRAMLISTING = NO 1492 | 1493 | #--------------------------------------------------------------------------- 1494 | # configuration options for the AutoGen Definitions output 1495 | #--------------------------------------------------------------------------- 1496 | 1497 | # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 1498 | # generate an AutoGen Definitions (see autogen.sf.net) file 1499 | # that captures the structure of the code including all 1500 | # documentation. Note that this feature is still experimental 1501 | # and incomplete at the moment. 1502 | 1503 | GENERATE_AUTOGEN_DEF = NO 1504 | 1505 | #--------------------------------------------------------------------------- 1506 | # configuration options related to the Perl module output 1507 | #--------------------------------------------------------------------------- 1508 | 1509 | # If the GENERATE_PERLMOD tag is set to YES Doxygen will 1510 | # generate a Perl module file that captures the structure of 1511 | # the code including all documentation. Note that this 1512 | # feature is still experimental and incomplete at the 1513 | # moment. 1514 | 1515 | GENERATE_PERLMOD = NO 1516 | 1517 | # If the PERLMOD_LATEX tag is set to YES Doxygen will generate 1518 | # the necessary Makefile rules, Perl scripts and LaTeX code to be able 1519 | # to generate PDF and DVI output from the Perl module output. 1520 | 1521 | PERLMOD_LATEX = NO 1522 | 1523 | # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 1524 | # nicely formatted so it can be parsed by a human reader. 1525 | # This is useful 1526 | # if you want to understand what is going on. 1527 | # On the other hand, if this 1528 | # tag is set to NO the size of the Perl module output will be much smaller 1529 | # and Perl will parse it just the same. 1530 | 1531 | PERLMOD_PRETTY = YES 1532 | 1533 | # The names of the make variables in the generated doxyrules.make file 1534 | # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 1535 | # This is useful so different doxyrules.make files included by the same 1536 | # Makefile don't overwrite each other's variables. 1537 | 1538 | PERLMOD_MAKEVAR_PREFIX = 1539 | 1540 | #--------------------------------------------------------------------------- 1541 | # Configuration options related to the preprocessor 1542 | #--------------------------------------------------------------------------- 1543 | 1544 | # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 1545 | # evaluate all C-preprocessor directives found in the sources and include 1546 | # files. 1547 | 1548 | ENABLE_PREPROCESSING = YES 1549 | 1550 | # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 1551 | # names in the source code. If set to NO (the default) only conditional 1552 | # compilation will be performed. Macro expansion can be done in a controlled 1553 | # way by setting EXPAND_ONLY_PREDEF to YES. 1554 | 1555 | MACRO_EXPANSION = NO 1556 | 1557 | # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 1558 | # then the macro expansion is limited to the macros specified with the 1559 | # PREDEFINED and EXPAND_AS_DEFINED tags. 1560 | 1561 | EXPAND_ONLY_PREDEF = NO 1562 | 1563 | # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 1564 | # pointed to by INCLUDE_PATH will be searched when a #include is found. 1565 | 1566 | SEARCH_INCLUDES = YES 1567 | 1568 | # The INCLUDE_PATH tag can be used to specify one or more directories that 1569 | # contain include files that are not input files but should be processed by 1570 | # the preprocessor. 1571 | 1572 | INCLUDE_PATH = 1573 | 1574 | # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 1575 | # patterns (like *.h and *.hpp) to filter out the header-files in the 1576 | # directories. If left blank, the patterns specified with FILE_PATTERNS will 1577 | # be used. 1578 | 1579 | INCLUDE_FILE_PATTERNS = 1580 | 1581 | # The PREDEFINED tag can be used to specify one or more macro names that 1582 | # are defined before the preprocessor is started (similar to the -D option of 1583 | # gcc). The argument of the tag is a list of macros of the form: name 1584 | # or name=definition (no spaces). If the definition and the = are 1585 | # omitted =1 is assumed. To prevent a macro definition from being 1586 | # undefined via #undef or recursively expanded use the := operator 1587 | # instead of the = operator. 1588 | 1589 | PREDEFINED = 1590 | 1591 | # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 1592 | # this tag can be used to specify a list of macro names that should be expanded. 1593 | # The macro definition that is found in the sources will be used. 1594 | # Use the PREDEFINED tag if you want to use a different macro definition that 1595 | # overrules the definition found in the source code. 1596 | 1597 | EXPAND_AS_DEFINED = 1598 | 1599 | # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 1600 | # doxygen's preprocessor will remove all references to function-like macros 1601 | # that are alone on a line, have an all uppercase name, and do not end with a 1602 | # semicolon, because these will confuse the parser if not removed. 1603 | 1604 | SKIP_FUNCTION_MACROS = YES 1605 | 1606 | #--------------------------------------------------------------------------- 1607 | # Configuration::additions related to external references 1608 | #--------------------------------------------------------------------------- 1609 | 1610 | # The TAGFILES option can be used to specify one or more tagfiles. For each 1611 | # tag file the location of the external documentation should be added. The 1612 | # format of a tag file without this location is as follows: 1613 | # 1614 | # TAGFILES = file1 file2 ... 1615 | # Adding location for the tag files is done as follows: 1616 | # 1617 | # TAGFILES = file1=loc1 "file2 = loc2" ... 1618 | # where "loc1" and "loc2" can be relative or absolute paths 1619 | # or URLs. Note that each tag file must have a unique name (where the name does 1620 | # NOT include the path). If a tag file is not located in the directory in which 1621 | # doxygen is run, you must also specify the path to the tagfile here. 1622 | 1623 | TAGFILES = 1624 | 1625 | # When a file name is specified after GENERATE_TAGFILE, doxygen will create 1626 | # a tag file that is based on the input files it reads. 1627 | 1628 | GENERATE_TAGFILE = 1629 | 1630 | # If the ALLEXTERNALS tag is set to YES all external classes will be listed 1631 | # in the class index. If set to NO only the inherited external classes 1632 | # will be listed. 1633 | 1634 | ALLEXTERNALS = NO 1635 | 1636 | # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 1637 | # in the modules index. If set to NO, only the current project's groups will 1638 | # be listed. 1639 | 1640 | EXTERNAL_GROUPS = YES 1641 | 1642 | # The PERL_PATH should be the absolute path and name of the perl script 1643 | # interpreter (i.e. the result of `which perl'). 1644 | 1645 | PERL_PATH = /usr/bin/perl 1646 | 1647 | #--------------------------------------------------------------------------- 1648 | # Configuration options related to the dot tool 1649 | #--------------------------------------------------------------------------- 1650 | 1651 | # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 1652 | # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 1653 | # or super classes. Setting the tag to NO turns the diagrams off. Note that 1654 | # this option also works with HAVE_DOT disabled, but it is recommended to 1655 | # install and use dot, since it yields more powerful graphs. 1656 | 1657 | CLASS_DIAGRAMS = YES 1658 | 1659 | # You can define message sequence charts within doxygen comments using the \msc 1660 | # command. Doxygen will then run the mscgen tool (see 1661 | # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 1662 | # documentation. The MSCGEN_PATH tag allows you to specify the directory where 1663 | # the mscgen tool resides. If left empty the tool is assumed to be found in the 1664 | # default search path. 1665 | 1666 | MSCGEN_PATH = 1667 | 1668 | # If set to YES, the inheritance and collaboration graphs will hide 1669 | # inheritance and usage relations if the target is undocumented 1670 | # or is not a class. 1671 | 1672 | HIDE_UNDOC_RELATIONS = YES 1673 | 1674 | # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 1675 | # available from the path. This tool is part of Graphviz, a graph visualization 1676 | # toolkit from AT&T and Lucent Bell Labs. The other options in this section 1677 | # have no effect if this option is set to NO (the default) 1678 | 1679 | HAVE_DOT = NO 1680 | 1681 | # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is 1682 | # allowed to run in parallel. When set to 0 (the default) doxygen will 1683 | # base this on the number of processors available in the system. You can set it 1684 | # explicitly to a value larger than 0 to get control over the balance 1685 | # between CPU load and processing speed. 1686 | 1687 | DOT_NUM_THREADS = 0 1688 | 1689 | # By default doxygen will use the Helvetica font for all dot files that 1690 | # doxygen generates. When you want a differently looking font you can specify 1691 | # the font name using DOT_FONTNAME. You need to make sure dot is able to find 1692 | # the font, which can be done by putting it in a standard location or by setting 1693 | # the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the 1694 | # directory containing the font. 1695 | 1696 | DOT_FONTNAME = Helvetica 1697 | 1698 | # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 1699 | # The default size is 10pt. 1700 | 1701 | DOT_FONTSIZE = 10 1702 | 1703 | # By default doxygen will tell dot to use the Helvetica font. 1704 | # If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to 1705 | # set the path where dot can find it. 1706 | 1707 | DOT_FONTPATH = 1708 | 1709 | # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 1710 | # will generate a graph for each documented class showing the direct and 1711 | # indirect inheritance relations. Setting this tag to YES will force the 1712 | # CLASS_DIAGRAMS tag to NO. 1713 | 1714 | CLASS_GRAPH = YES 1715 | 1716 | # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 1717 | # will generate a graph for each documented class showing the direct and 1718 | # indirect implementation dependencies (inheritance, containment, and 1719 | # class references variables) of the class with other documented classes. 1720 | 1721 | COLLABORATION_GRAPH = YES 1722 | 1723 | # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 1724 | # will generate a graph for groups, showing the direct groups dependencies 1725 | 1726 | GROUP_GRAPHS = YES 1727 | 1728 | # If the UML_LOOK tag is set to YES doxygen will generate inheritance and 1729 | # collaboration diagrams in a style similar to the OMG's Unified Modeling 1730 | # Language. 1731 | 1732 | UML_LOOK = NO 1733 | 1734 | # If the UML_LOOK tag is enabled, the fields and methods are shown inside 1735 | # the class node. If there are many fields or methods and many nodes the 1736 | # graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS 1737 | # threshold limits the number of items for each type to make the size more 1738 | # managable. Set this to 0 for no limit. Note that the threshold may be 1739 | # exceeded by 50% before the limit is enforced. 1740 | 1741 | UML_LIMIT_NUM_FIELDS = 10 1742 | 1743 | # If set to YES, the inheritance and collaboration graphs will show the 1744 | # relations between templates and their instances. 1745 | 1746 | TEMPLATE_RELATIONS = NO 1747 | 1748 | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 1749 | # tags are set to YES then doxygen will generate a graph for each documented 1750 | # file showing the direct and indirect include dependencies of the file with 1751 | # other documented files. 1752 | 1753 | INCLUDE_GRAPH = YES 1754 | 1755 | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 1756 | # HAVE_DOT tags are set to YES then doxygen will generate a graph for each 1757 | # documented header file showing the documented files that directly or 1758 | # indirectly include this file. 1759 | 1760 | INCLUDED_BY_GRAPH = YES 1761 | 1762 | # If the CALL_GRAPH and HAVE_DOT options are set to YES then 1763 | # doxygen will generate a call dependency graph for every global function 1764 | # or class method. Note that enabling this option will significantly increase 1765 | # the time of a run. So in most cases it will be better to enable call graphs 1766 | # for selected functions only using the \callgraph command. 1767 | 1768 | CALL_GRAPH = NO 1769 | 1770 | # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 1771 | # doxygen will generate a caller dependency graph for every global function 1772 | # or class method. Note that enabling this option will significantly increase 1773 | # the time of a run. So in most cases it will be better to enable caller 1774 | # graphs for selected functions only using the \callergraph command. 1775 | 1776 | CALLER_GRAPH = NO 1777 | 1778 | # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 1779 | # will generate a graphical hierarchy of all classes instead of a textual one. 1780 | 1781 | GRAPHICAL_HIERARCHY = YES 1782 | 1783 | # If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES 1784 | # then doxygen will show the dependencies a directory has on other directories 1785 | # in a graphical way. The dependency relations are determined by the #include 1786 | # relations between the files in the directories. 1787 | 1788 | DIRECTORY_GRAPH = YES 1789 | 1790 | # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 1791 | # generated by dot. Possible values are svg, png, jpg, or gif. 1792 | # If left blank png will be used. If you choose svg you need to set 1793 | # HTML_FILE_EXTENSION to xhtml in order to make the SVG files 1794 | # visible in IE 9+ (other browsers do not have this requirement). 1795 | 1796 | DOT_IMAGE_FORMAT = png 1797 | 1798 | # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to 1799 | # enable generation of interactive SVG images that allow zooming and panning. 1800 | # Note that this requires a modern browser other than Internet Explorer. 1801 | # Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you 1802 | # need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files 1803 | # visible. Older versions of IE do not have SVG support. 1804 | 1805 | INTERACTIVE_SVG = NO 1806 | 1807 | # The tag DOT_PATH can be used to specify the path where the dot tool can be 1808 | # found. If left blank, it is assumed the dot tool can be found in the path. 1809 | 1810 | DOT_PATH = 1811 | 1812 | # The DOTFILE_DIRS tag can be used to specify one or more directories that 1813 | # contain dot files that are included in the documentation (see the 1814 | # \dotfile command). 1815 | 1816 | DOTFILE_DIRS = 1817 | 1818 | # The MSCFILE_DIRS tag can be used to specify one or more directories that 1819 | # contain msc files that are included in the documentation (see the 1820 | # \mscfile command). 1821 | 1822 | MSCFILE_DIRS = 1823 | 1824 | # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 1825 | # nodes that will be shown in the graph. If the number of nodes in a graph 1826 | # becomes larger than this value, doxygen will truncate the graph, which is 1827 | # visualized by representing a node as a red box. Note that doxygen if the 1828 | # number of direct children of the root node in a graph is already larger than 1829 | # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 1830 | # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. 1831 | 1832 | DOT_GRAPH_MAX_NODES = 50 1833 | 1834 | # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 1835 | # graphs generated by dot. A depth value of 3 means that only nodes reachable 1836 | # from the root by following a path via at most 3 edges will be shown. Nodes 1837 | # that lay further from the root node will be omitted. Note that setting this 1838 | # option to 1 or 2 may greatly reduce the computation time needed for large 1839 | # code bases. Also note that the size of a graph can be further restricted by 1840 | # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. 1841 | 1842 | MAX_DOT_GRAPH_DEPTH = 0 1843 | 1844 | # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 1845 | # background. This is disabled by default, because dot on Windows does not 1846 | # seem to support this out of the box. Warning: Depending on the platform used, 1847 | # enabling this option may lead to badly anti-aliased labels on the edges of 1848 | # a graph (i.e. they become hard to read). 1849 | 1850 | DOT_TRANSPARENT = NO 1851 | 1852 | # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 1853 | # files in one run (i.e. multiple -o and -T options on the command line). This 1854 | # makes dot run faster, but since only newer versions of dot (>1.8.10) 1855 | # support this, this feature is disabled by default. 1856 | 1857 | DOT_MULTI_TARGETS = NO 1858 | 1859 | # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 1860 | # generate a legend page explaining the meaning of the various boxes and 1861 | # arrows in the dot generated graphs. 1862 | 1863 | GENERATE_LEGEND = YES 1864 | 1865 | # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 1866 | # remove the intermediate dot files that are used to generate 1867 | # the various graphs. 1868 | 1869 | DOT_CLEANUP = YES 1870 | -------------------------------------------------------------------------------- /doc/doxygen/mainpage.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @mainpage librfc API Documentation 3 | * 4 | * This is API documentation automatically generated from the source code 5 | * using the Doxygen documentation generation tool. 6 | * 7 | * @see http://librfc.org/ 8 | */ 9 | -------------------------------------------------------------------------------- /doc/examples/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | http 3 | json 4 | md5 5 | sha1 6 | uri 7 | utf8 8 | uuid 9 | -------------------------------------------------------------------------------- /doc/examples/Makefile: -------------------------------------------------------------------------------- 1 | CPPFLAGS = 2 | CXXFLAGS = -std=c++11 -stdlib=libc++ 3 | LDFLAGS = -lrfc 4 | 5 | PROGRAMS = http json md5 sha1 uri utf8 uuid 6 | 7 | all: $(PROGRAMS) 8 | 9 | clean: 10 | $(RM) $(PROGRAMS) *.o *~ 11 | 12 | .PHONY: all clean 13 | -------------------------------------------------------------------------------- /doc/examples/http.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #include 4 | 5 | #include 6 | 7 | int main() { 8 | return 0; // TODO 9 | } 10 | -------------------------------------------------------------------------------- /doc/examples/json.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #include 4 | 5 | #include 6 | 7 | int main() { 8 | return 0; // TODO 9 | } 10 | -------------------------------------------------------------------------------- /doc/examples/md5.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #include 4 | 5 | #include 6 | 7 | int main() { 8 | return 0; // TODO 9 | } 10 | -------------------------------------------------------------------------------- /doc/examples/sha1.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #include 4 | 5 | #include 6 | 7 | int main() { 8 | return 0; // TODO 9 | } 10 | -------------------------------------------------------------------------------- /doc/examples/uri.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #include 4 | 5 | #include 6 | 7 | int main() { 8 | return 0; // TODO 9 | } 10 | -------------------------------------------------------------------------------- /doc/examples/utf8.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #include 4 | 5 | #include 6 | 7 | int main() { 8 | return 0; // TODO 9 | } 10 | -------------------------------------------------------------------------------- /doc/examples/uuid.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #include 4 | 5 | #include 6 | 7 | int main() { 8 | return 0; // TODO 9 | } 10 | -------------------------------------------------------------------------------- /doc/manual/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drycpp/librfc/dae5fa85afcfd2f2f1d6f6de7a7cf95ce0e53d46/doc/manual/.gitkeep -------------------------------------------------------------------------------- /etc/aclocal/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drycpp/librfc/dae5fa85afcfd2f2f1d6f6de7a7cf95ce0e53d46/etc/aclocal/.gitkeep -------------------------------------------------------------------------------- /etc/aclocal/ax_cxx_compile_stdcxx_11.m4: -------------------------------------------------------------------------------- 1 | # ============================================================================ 2 | # http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html 3 | # ============================================================================ 4 | # 5 | # SYNOPSIS 6 | # 7 | # AX_CXX_COMPILE_STDCXX_11([ext|noext]) 8 | # 9 | # DESCRIPTION 10 | # 11 | # Check for baseline language coverage in the compiler for the C++11 12 | # standard; if necessary, add switches to CXXFLAGS to enable support. 13 | # Errors out if no mode that supports C++11 baseline syntax can be found. 14 | # The argument, if specified, indicates whether you insist on an extended 15 | # mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. -std=c++11). 16 | # If neither is specified, you get whatever works, with preference for an 17 | # extended mode. 18 | # 19 | # LICENSE 20 | # 21 | # Copyright (c) 2008 Benjamin Kosnik 22 | # Copyright (c) 2012 Zack Weinberg 23 | # 24 | # Copying and distribution of this file, with or without modification, are 25 | # permitted in any medium without royalty provided the copyright notice 26 | # and this notice are preserved. This file is offered as-is, without any 27 | # warranty. 28 | 29 | #serial 1 30 | 31 | m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [ 32 | template 33 | struct check 34 | { 35 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); 36 | }; 37 | 38 | typedef check> right_angle_brackets; 39 | 40 | int a; 41 | decltype(a) b; 42 | 43 | typedef check check_type; 44 | check_type c; 45 | check_type&& cr = static_cast(c); 46 | ]) 47 | 48 | AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl 49 | m4_if([$1], [], [], 50 | [$1], [ext], [], 51 | [$1], [noext], [], 52 | [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl 53 | AC_LANG_ASSERT([C++])dnl 54 | ac_success=no 55 | AC_CACHE_CHECK(whether $CXX supports C++11 features by default, 56 | ax_cv_cxx_compile_cxx11, 57 | [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], 58 | [ax_cv_cxx_compile_cxx11=yes], 59 | [ax_cv_cxx_compile_cxx11=no])]) 60 | if test x$ax_cv_cxx_compile_cxx11 = xyes; then 61 | ac_success=yes 62 | fi 63 | 64 | m4_if([$1], [noext], [], [dnl 65 | if test x$ac_success = xno; then 66 | for switch in -std=gnu++11 -std=gnu++0x; do 67 | cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) 68 | AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, 69 | $cachevar, 70 | [ac_save_CXXFLAGS="$CXXFLAGS" 71 | CXXFLAGS="$CXXFLAGS $switch" 72 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], 73 | [eval $cachevar=yes], 74 | [eval $cachevar=no]) 75 | CXXFLAGS="$ac_save_CXXFLAGS"]) 76 | if eval test x\$$cachevar = xyes; then 77 | CXXFLAGS="$CXXFLAGS $switch" 78 | ac_success=yes 79 | break 80 | fi 81 | done 82 | fi]) 83 | 84 | m4_if([$1], [ext], [], [dnl 85 | if test x$ac_success = xno; then 86 | for switch in -std=c++11 -std=c++0x; do 87 | cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) 88 | AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, 89 | $cachevar, 90 | [ac_save_CXXFLAGS="$CXXFLAGS" 91 | CXXFLAGS="$CXXFLAGS $switch" 92 | AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], 93 | [eval $cachevar=yes], 94 | [eval $cachevar=no]) 95 | CXXFLAGS="$ac_save_CXXFLAGS"]) 96 | if eval test x\$$cachevar = xyes; then 97 | CXXFLAGS="$CXXFLAGS $switch" 98 | ac_success=yes 99 | break 100 | fi 101 | done 102 | fi]) 103 | 104 | if test x$ac_success = xno; then 105 | AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.]) 106 | fi 107 | ]) 108 | -------------------------------------------------------------------------------- /etc/coverity/model.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | /** 4 | * @file 5 | * 6 | * Coverity Scan model for librfc. 7 | * 8 | * @see https://scan.coverity.com/tune 9 | */ 10 | -------------------------------------------------------------------------------- /etc/debian/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drycpp/librfc/dae5fa85afcfd2f2f1d6f6de7a7cf95ce0e53d46/etc/debian/.gitkeep -------------------------------------------------------------------------------- /etc/doap.rdf: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 2013-02-05 12 | 13 | Public domain implementations of core RFC specifications for C/C++. 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | librfc 22 | C 23 | C++ 24 | RFC implementations for C/C++ 25 | 26 | 27 | 28 | 29 | 30 | a033f652c84a4d73b8c26d318c2395699dd2bdfb 31 | Arto Bendiken 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /etc/macports/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drycpp/librfc/dae5fa85afcfd2f2f1d6f6de7a7cf95ce0e53d46/etc/macports/.gitkeep -------------------------------------------------------------------------------- /ffi/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drycpp/librfc/dae5fa85afcfd2f2f1d6f6de7a7cf95ce0e53d46/ffi/.gitkeep -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | config.h 2 | config.h.in 3 | config.h.in~ 4 | -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = rfc 2 | 3 | include_HEADERS = rfc.h 4 | -------------------------------------------------------------------------------- /src/rfc.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_H 4 | #define RFC_H 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | /** 11 | * @file 12 | * 13 | * librfc. 14 | */ 15 | 16 | #include "rfc/feature.h" 17 | #include "rfc/module.h" 18 | #include "rfc/version.h" 19 | 20 | #ifdef __cplusplus 21 | } /* extern "C" */ 22 | #endif 23 | 24 | #endif /* RFC_H */ 25 | -------------------------------------------------------------------------------- /src/rfc/.gitignore: -------------------------------------------------------------------------------- 1 | .deps/ 2 | .libs/ 3 | .dirstamp 4 | *.a 5 | *.o 6 | *.la 7 | *.lo 8 | version.h 9 | -------------------------------------------------------------------------------- /src/rfc/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = librfc.la 2 | 3 | librfc_la_SOURCES = \ 4 | feature.cc \ 5 | module.cc \ 6 | version.cc 7 | 8 | pkgincludedir = $(includedir)/rfc 9 | base_pkgincludedir = $(pkgincludedir) 10 | 11 | base_pkginclude_HEADERS = \ 12 | feature.h \ 13 | module.h \ 14 | version.h 15 | 16 | nobase_pkginclude_HEADERS = \ 17 | util/str.h 18 | 19 | if !DISABLE_RFC1321 20 | librfc_la_SOURCES += rfc1321/md5_digest.cc 21 | nobase_pkginclude_HEADERS += rfc1321.h \ 22 | rfc1321/md5_digest.h \ 23 | md5.h 24 | endif 25 | 26 | if !DISABLE_RFC2616 27 | librfc_la_SOURCES += rfc2616/http_request.cc \ 28 | rfc2616/http_response.cc 29 | nobase_pkginclude_HEADERS += rfc2616.h \ 30 | rfc2616/http_request.h \ 31 | rfc2616/http_response.h \ 32 | http.h 33 | endif 34 | 35 | if !DISABLE_RFC3174 36 | librfc_la_SOURCES += rfc3174/sha1_digest.cc 37 | nobase_pkginclude_HEADERS += rfc3174.h \ 38 | rfc3174/sha1_digest.h \ 39 | sha1.h 40 | endif 41 | 42 | if !DISABLE_RFC3629 43 | librfc_la_SOURCES += rfc3629/utf8_decode.cc \ 44 | rfc3629/utf8_encode.cc 45 | nobase_pkginclude_HEADERS += rfc3629.h \ 46 | rfc3629/utf8_decode.h \ 47 | rfc3629/utf8_encode.h \ 48 | utf8.h 49 | endif 50 | 51 | if !DISABLE_RFC3986 52 | librfc_la_SOURCES += rfc3986/uri.cc 53 | nobase_pkginclude_HEADERS += rfc3986.h \ 54 | rfc3986/uri.h \ 55 | uri.h 56 | endif 57 | 58 | if !DISABLE_RFC4122 59 | librfc_la_SOURCES += rfc4122/uuid.cc 60 | nobase_pkginclude_HEADERS += rfc4122.h \ 61 | rfc4122/uuid.h \ 62 | uuid.h 63 | endif 64 | 65 | if !DISABLE_RFC4627 66 | librfc_la_SOURCES += rfc4627/json_array.cc \ 67 | rfc4627/json_boolean.cc \ 68 | rfc4627/json_number.cc \ 69 | rfc4627/json_object.cc \ 70 | rfc4627/json_reader.cc \ 71 | rfc4627/json_string.cc \ 72 | rfc4627/json_value.cc \ 73 | rfc4627/json_writer.cc 74 | nobase_pkginclude_HEADERS += rfc4627.h \ 75 | rfc4627/json_array.h \ 76 | rfc4627/json_boolean.h \ 77 | rfc4627/json_number.h \ 78 | rfc4627/json_object.h \ 79 | rfc4627/json_reader.h \ 80 | rfc4627/json_string.h \ 81 | rfc4627/json_value.h \ 82 | rfc4627/json_writer.h \ 83 | json.h 84 | endif 85 | -------------------------------------------------------------------------------- /src/rfc/feature.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifdef HAVE_CONFIG_H 4 | #include 5 | #endif 6 | 7 | #include "feature.h" 8 | 9 | #include /* for assert() */ 10 | #include /* for std::strcmp() */ 11 | 12 | static const char* const rfc_feature_names[] = { 13 | "ascii", 14 | #ifdef ENABLE_DEBUG 15 | "debug", 16 | #endif 17 | #ifndef DISABLE_UNICODE 18 | "unicode", 19 | #endif 20 | }; 21 | 22 | bool 23 | rfc_feature_exists(const char* const feature_name) { 24 | assert(feature_name != nullptr); 25 | 26 | if (feature_name != nullptr) { 27 | for (const char* const rfc_feature_name : rfc_feature_names) { 28 | if (std::strcmp(rfc_feature_name, feature_name) == 0) { 29 | return true; /* found */ 30 | } 31 | } 32 | } 33 | 34 | return false; /* not found */ 35 | } 36 | -------------------------------------------------------------------------------- /src/rfc/feature.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_FEATURE_H 4 | #define RFC_FEATURE_H 5 | 6 | /** 7 | * @file 8 | */ 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include /* for bool */ 15 | 16 | /** 17 | * Determines whether librfc supports a given feature. 18 | */ 19 | bool rfc_feature_exists(const char* feature_name); 20 | 21 | #ifdef __cplusplus 22 | } /* extern "C" */ 23 | #endif 24 | 25 | #endif /* RFC_FEATURE_H */ 26 | -------------------------------------------------------------------------------- /src/rfc/http: -------------------------------------------------------------------------------- 1 | rfc2616 -------------------------------------------------------------------------------- /src/rfc/http.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_HTTP_H 4 | #define RFC_HTTP_H 5 | 6 | #include "rfc2616.h" /* RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1 */ 7 | 8 | #endif /* RFC_HTTP_H */ 9 | -------------------------------------------------------------------------------- /src/rfc/ipv4/ipv4_address.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_IPV4_ADDRESS_H 4 | #define RFC_IPV4_ADDRESS_H 5 | 6 | /** 7 | * @file 8 | */ 9 | 10 | #include /* for std::size_t */ 11 | #include /* for std::uint8_t */ 12 | #include /* for std::memcmp(), std::memset() */ 13 | #include /* for std::swap() */ 14 | 15 | namespace rfc791 { 16 | class ipv4_address; 17 | } 18 | 19 | /** 20 | * Represents an Internet Protocol version 4 (IPv4) address. 21 | */ 22 | class rfc791::ipv4_address { 23 | protected: 24 | std::uint8_t _octets[4] = {0, 0, 0, 0}; 25 | 26 | public: 27 | static constexpr std::size_t size = 4; /* 4 bytes (32 bits) */ 28 | 29 | /** 30 | * Default constructor. The address is all zeroes after construction. 31 | */ 32 | inline ipv4_address() noexcept {} 33 | 34 | /** 35 | * Constructor. 36 | */ 37 | inline ipv4_address(const std::uint8_t octet1, 38 | const std::uint8_t octet2, 39 | const std::uint8_t octet3, 40 | const std::uint8_t octet4) noexcept 41 | : _octets{octet1, octet2, octet3, octet4} {} 42 | 43 | /** 44 | * Copy constructor. 45 | */ 46 | inline ipv4_address(const ipv4_address& other) noexcept { 47 | *_octets = *other._octets; 48 | } 49 | 50 | /** 51 | * Move constructor. 52 | */ 53 | inline ipv4_address(ipv4_address&& other) noexcept { 54 | std::swap(_octets, other._octets); 55 | } 56 | 57 | /** 58 | * Destructor. 59 | */ 60 | inline ~ipv4_address() noexcept = default; 61 | 62 | /** 63 | * Copy assignment operator. 64 | */ 65 | inline ipv4_address& operator=(ipv4_address other) noexcept { 66 | std::swap(_octets, other._octets); 67 | return *this; 68 | } 69 | 70 | /** 71 | * Move assignment operator. 72 | */ 73 | inline ipv4_address& operator=(ipv4_address&& other) noexcept { 74 | std::swap(_octets, other._octets); 75 | return *this; 76 | } 77 | 78 | /** 79 | * Equality operator. 80 | */ 81 | inline bool operator==(const ipv4_address& other) const { 82 | return compare(other) == 0; 83 | } 84 | 85 | /** 86 | * Inequality operator. 87 | */ 88 | inline bool operator!=(const ipv4_address& other) const { 89 | return compare(other) != 0; 90 | } 91 | 92 | /** 93 | * Less-than operator. 94 | */ 95 | inline bool operator<(const ipv4_address& other) const { 96 | return compare(other) < 0; 97 | } 98 | 99 | /** 100 | * Less-than-or-equal-to operator. 101 | */ 102 | inline bool operator<=(const ipv4_address& other) const { 103 | return compare(other) <= 0; 104 | } 105 | 106 | /** 107 | * Greater-than operator. 108 | */ 109 | inline bool operator>(const ipv4_address& other) const { 110 | return compare(other) > 0; 111 | } 112 | 113 | /** 114 | * Greater-than-or-equal-to operator. 115 | */ 116 | inline bool operator>=(const ipv4_address& other) const { 117 | return compare(other) >= 0; 118 | } 119 | 120 | /** 121 | * Returns a reference to the octet at the given position. 122 | */ 123 | inline std::uint8_t& operator[](const std::size_t position) noexcept { 124 | return _octets[position]; 125 | } 126 | 127 | /** 128 | * Returns a reference to the octet at the given position. 129 | */ 130 | inline const std::uint8_t& operator[](const std::size_t position) const noexcept { 131 | return _octets[position]; 132 | } 133 | 134 | /** 135 | * Returns a pointer to the octet data. 136 | */ 137 | inline std::uint8_t* data() { 138 | return _octets; 139 | } 140 | 141 | /** 142 | * Returns a pointer to the octet data. 143 | */ 144 | inline const std::uint8_t* data() const { 145 | return _octets; 146 | } 147 | 148 | /** 149 | * Compares this address to the given other address. 150 | */ 151 | inline int compare(const ipv4_address& other) const noexcept { 152 | return std::memcmp(_octets, other._octets, sizeof(_octets)); 153 | } 154 | 155 | /** 156 | * Clears this address to be all zeroes. 157 | */ 158 | inline void clear() noexcept { 159 | std::memset(_octets, 0, sizeof(_octets)); 160 | } 161 | 162 | /** 163 | * Exchanges this address with the given other address. 164 | */ 165 | inline void swap(ipv4_address& other) noexcept { 166 | std::swap(_octets, other._octets); 167 | } 168 | }; 169 | 170 | #endif /* RFC_IPV4_ADDRESS_H */ 171 | -------------------------------------------------------------------------------- /src/rfc/json: -------------------------------------------------------------------------------- 1 | rfc4627 -------------------------------------------------------------------------------- /src/rfc/json.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_JSON_H 4 | #define RFC_JSON_H 5 | 6 | #include "rfc4627.h" /* RFC 4627: JavaScript Object Notation (JSON) */ 7 | 8 | #endif /* RFC_JSON_H */ 9 | -------------------------------------------------------------------------------- /src/rfc/md5: -------------------------------------------------------------------------------- 1 | rfc1321 -------------------------------------------------------------------------------- /src/rfc/md5.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_MD5_H 4 | #define RFC_MD5_H 5 | 6 | #include "rfc1321.h" /* RFC 1321: The MD5 Message-Digest Algorithm */ 7 | 8 | #endif /* RFC_MD5_H */ 9 | -------------------------------------------------------------------------------- /src/rfc/module.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifdef HAVE_CONFIG_H 4 | #include 5 | #endif 6 | 7 | #include "module.h" 8 | 9 | #include /* for assert() */ 10 | #include /* for std::strcmp() */ 11 | 12 | static const char* const rfc_module_names[] = { 13 | #ifndef DISABLE_RFC1321 14 | "rfc1321", /* MD5 */ 15 | #endif 16 | #ifndef DISABLE_RFC2616 17 | "rfc2616", /* HTTP/1.1 */ 18 | #endif 19 | #ifndef DISABLE_RFC3174 20 | "rfc3174", /* SHA-1 */ 21 | #endif 22 | #ifndef DISABLE_RFC3629 23 | "rfc3629", /* UTF-8 */ 24 | #endif 25 | #ifndef DISABLE_RFC3986 26 | "rfc3986", /* URI */ 27 | #endif 28 | #ifndef DISABLE_RFC4122 29 | "rfc4122", /* UUID */ 30 | #endif 31 | #ifndef DISABLE_RFC4627 32 | "rfc4627", /* JSON */ 33 | #endif 34 | }; 35 | 36 | bool 37 | rfc_module_exists(const char* const module_name) { 38 | assert(module_name != nullptr); 39 | 40 | if (module_name != nullptr) { 41 | for (const char* const rfc_module_name : rfc_module_names) { 42 | if (std::strcmp(rfc_module_name, module_name) == 0) { 43 | return true; /* found */ 44 | } 45 | } 46 | } 47 | 48 | return false; /* not found */ 49 | } 50 | -------------------------------------------------------------------------------- /src/rfc/module.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_MODULE_H 4 | #define RFC_MODULE_H 5 | 6 | /** 7 | * @file 8 | */ 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #include /* for bool */ 15 | 16 | /** 17 | * Determines whether librfc includes a given module. 18 | */ 19 | bool rfc_module_exists(const char* module_name); 20 | 21 | #ifdef __cplusplus 22 | } /* extern "C" */ 23 | #endif 24 | 25 | #endif /* RFC_MODULE_H */ 26 | -------------------------------------------------------------------------------- /src/rfc/rfc1321.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC1321_H 4 | #define RFC_RFC1321_H 5 | 6 | /** 7 | * @file 8 | * 9 | * An implementation of RFC 1321: The MD5 Message-Digest Algorithm. 10 | * 11 | * @see http://tools.ietf.org/html/rfc1321 12 | */ 13 | 14 | #include "rfc1321/md5_digest.h" 15 | 16 | #endif /* RFC_RFC1321_H */ 17 | -------------------------------------------------------------------------------- /src/rfc/rfc1321/md5_digest.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifdef HAVE_CONFIG_H 4 | #include 5 | #endif 6 | 7 | #include "md5_digest.h" 8 | 9 | #include /* for std::strlen() */ 10 | 11 | using namespace rfc1321; 12 | 13 | static_assert(sizeof(md5_digest) == md5_digest::size, 14 | "sizeof(rfc1321::md5_digest) != rfc1321::md5_digest::size"); 15 | 16 | md5_digest 17 | md5_digest::compute(const char* const data) noexcept { 18 | return compute(reinterpret_cast(data), std::strlen(data)); 19 | } 20 | 21 | md5_digest 22 | md5_digest::compute(const std::uint8_t* const data, 23 | const std::size_t size) noexcept { 24 | md5_digest digest; 25 | 26 | (void)data, (void)size; // TODO 27 | 28 | return digest; 29 | } 30 | -------------------------------------------------------------------------------- /src/rfc/rfc1321/md5_digest.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC1321_MD5_DIGEST_H 4 | #define RFC_RFC1321_MD5_DIGEST_H 5 | 6 | /** 7 | * @file 8 | */ 9 | 10 | #include /* for std::size_t */ 11 | #include /* for std::uint8_t */ 12 | #include /* for std::memcmp(), std::memset() */ 13 | #include /* for std::swap() */ 14 | 15 | namespace rfc1321 { 16 | struct md5_digest; 17 | } 18 | 19 | /** 20 | * Represents an MD5 digest. 21 | */ 22 | struct rfc1321::md5_digest { 23 | public: 24 | static constexpr std::size_t size = 16; /* 16 bytes (128 bits) */ 25 | 26 | /** 27 | * Computes the MD5 digest of the given NUL-terminated input string. 28 | */ 29 | static md5_digest compute(const char* data) noexcept; 30 | 31 | /** 32 | * Computes the MD5 digest of the given input data. 33 | */ 34 | static md5_digest compute(const std::uint8_t* data, std::size_t size) noexcept; 35 | 36 | /** 37 | * Default constructor. The structure is all zeroes after construction. 38 | */ 39 | md5_digest() noexcept {} 40 | 41 | /** 42 | * Constructor. 43 | */ 44 | md5_digest(const std::uint8_t* const data) noexcept { 45 | *_data = *data; 46 | } 47 | 48 | /** 49 | * Copy constructor. 50 | */ 51 | md5_digest(const md5_digest& other) noexcept { 52 | *_data = *other._data; 53 | } 54 | 55 | /** 56 | * Move constructor. 57 | */ 58 | md5_digest(md5_digest&& other) noexcept { 59 | std::swap(_data, other._data); 60 | } 61 | 62 | /** 63 | * Destructor. 64 | */ 65 | ~md5_digest() noexcept {} 66 | 67 | /** 68 | * Copy assignment operator. 69 | */ 70 | md5_digest& operator=(md5_digest other) noexcept { 71 | std::swap(_data, other._data); 72 | return *this; 73 | } 74 | 75 | /** 76 | * Move assignment operator. 77 | */ 78 | md5_digest& operator=(md5_digest&& other) noexcept { 79 | std::swap(_data, other._data); 80 | return *this; 81 | } 82 | 83 | /** 84 | * Equality operator. 85 | */ 86 | bool operator==(const md5_digest& other) const { 87 | return compare(other) == 0; 88 | } 89 | 90 | /** 91 | * Inequality operator. 92 | */ 93 | bool operator!=(const md5_digest& other) const { 94 | return compare(other) != 0; 95 | } 96 | 97 | /** 98 | * Less-than operator. 99 | */ 100 | bool operator<(const md5_digest& other) const { 101 | return compare(other) < 0; 102 | } 103 | 104 | /** 105 | * Less-than-or-equal-to operator. 106 | */ 107 | bool operator<=(const md5_digest& other) const { 108 | return compare(other) <= 0; 109 | } 110 | 111 | /** 112 | * Greater-than operator. 113 | */ 114 | bool operator>(const md5_digest& other) const { 115 | return compare(other) > 0; 116 | } 117 | 118 | /** 119 | * Greater-than-or-equal-to operator. 120 | */ 121 | bool operator>=(const md5_digest& other) const { 122 | return compare(other) >= 0; 123 | } 124 | 125 | /** 126 | * Returns a reference to the byte at the given position. 127 | */ 128 | std::uint8_t& operator[](const std::size_t position) noexcept { 129 | return _data[position]; 130 | } 131 | 132 | /** 133 | * Returns a reference to the byte at the given position. 134 | */ 135 | const std::uint8_t& operator[](const std::size_t position) const noexcept { 136 | return _data[position]; 137 | } 138 | 139 | /** 140 | * Returns a pointer to the digest data. 141 | */ 142 | std::uint8_t* data() { 143 | return _data; 144 | } 145 | 146 | /** 147 | * Returns a pointer to the digest data. 148 | */ 149 | const std::uint8_t* data() const { 150 | return _data; 151 | } 152 | 153 | /** 154 | * Returns a reference to the first byte of the digest data. 155 | */ 156 | std::uint8_t& front() { 157 | return operator[](0); 158 | } 159 | 160 | /** 161 | * Returns a reference to the first byte of the digest data. 162 | */ 163 | const std::uint8_t& front() const { 164 | return operator[](0); 165 | } 166 | 167 | /** 168 | * Returns a reference to the last byte of the digest data. 169 | */ 170 | std::uint8_t& back() { 171 | return operator[](size - 1); 172 | } 173 | 174 | /** 175 | * Returns a reference to the last byte of the digest data. 176 | */ 177 | const std::uint8_t& back() const { 178 | return operator[](size - 1); 179 | } 180 | 181 | /** 182 | * Compares this digest to the given other digest. 183 | */ 184 | inline int compare(const md5_digest& other) const noexcept { 185 | return std::memcmp(_data, other._data, sizeof(_data)); 186 | } 187 | 188 | /** 189 | * Clears the digest data to be all zeroes. 190 | */ 191 | void clear() noexcept { 192 | std::memset(_data, 0, sizeof(_data)); 193 | } 194 | 195 | /** 196 | * Exchanges the digest data with the given other digest. 197 | */ 198 | void swap(md5_digest& other) noexcept { 199 | std::swap(_data, other._data); 200 | } 201 | 202 | protected: 203 | std::uint8_t _data[size] = {}; 204 | }; 205 | 206 | #endif /* RFC_RFC1321_MD5_DIGEST_H */ 207 | -------------------------------------------------------------------------------- /src/rfc/rfc2616.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC2616_H 4 | #define RFC_RFC2616_H 5 | 6 | /** 7 | * @file 8 | * 9 | * An implementation of RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1. 10 | * 11 | * @see http://tools.ietf.org/html/rfc2616 12 | */ 13 | 14 | #include "rfc2616/http_request.h" 15 | #include "rfc2616/http_response.h" 16 | 17 | #endif /* RFC_RFC2616_H */ 18 | -------------------------------------------------------------------------------- /src/rfc/rfc2616/http_request.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifdef HAVE_CONFIG_H 4 | #include 5 | #endif 6 | 7 | #include "http_request.h" 8 | -------------------------------------------------------------------------------- /src/rfc/rfc2616/http_request.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC2616_HTTP_REQUEST_H 4 | #define RFC_RFC2616_HTTP_REQUEST_H 5 | 6 | /** 7 | * @file 8 | */ 9 | 10 | namespace rfc2616 {} 11 | 12 | #endif /* RFC_RFC2616_HTTP_REQUEST_H */ 13 | -------------------------------------------------------------------------------- /src/rfc/rfc2616/http_response.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifdef HAVE_CONFIG_H 4 | #include 5 | #endif 6 | 7 | #include "http_response.h" 8 | -------------------------------------------------------------------------------- /src/rfc/rfc2616/http_response.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC2616_HTTP_RESPONSE_H 4 | #define RFC_RFC2616_HTTP_RESPONSE_H 5 | 6 | /** 7 | * @file 8 | */ 9 | 10 | namespace rfc2616 {} 11 | 12 | #endif /* RFC_RFC2616_HTTP_RESPONSE_H */ 13 | -------------------------------------------------------------------------------- /src/rfc/rfc3174.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC3174_H 4 | #define RFC_RFC3174_H 5 | 6 | /** 7 | * @file 8 | * 9 | * An implementation of RFC 3174: US Secure Hash Algorithm 1 (SHA-1). 10 | * 11 | * @see http://tools.ietf.org/html/rfc3174 12 | */ 13 | 14 | #include "rfc3174/sha1_digest.h" 15 | 16 | #endif /* RFC_RFC3174_H */ 17 | -------------------------------------------------------------------------------- /src/rfc/rfc3174/sha1_digest.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifdef HAVE_CONFIG_H 4 | #include 5 | #endif 6 | 7 | #include "sha1_digest.h" 8 | 9 | #include /* for std::strlen() */ 10 | 11 | using namespace rfc3174; 12 | 13 | static_assert(sizeof(sha1_digest) == sha1_digest::size, 14 | "sizeof(rfc3174::sha1_digest) != rfc3174::sha1_digest::size"); 15 | 16 | sha1_digest 17 | sha1_digest::compute(const char* const data) noexcept { 18 | return compute(reinterpret_cast(data), std::strlen(data)); 19 | } 20 | 21 | sha1_digest 22 | sha1_digest::compute(const std::uint8_t* const data, 23 | const std::size_t size) noexcept { 24 | sha1_digest digest; 25 | 26 | (void)data, (void)size; // TODO 27 | 28 | return digest; 29 | } 30 | -------------------------------------------------------------------------------- /src/rfc/rfc3174/sha1_digest.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC3174_SHA1_DIGEST_H 4 | #define RFC_RFC3174_SHA1_DIGEST_H 5 | 6 | /** 7 | * @file 8 | */ 9 | 10 | #include /* for std::size_t */ 11 | #include /* for std::uint8_t */ 12 | #include /* for std::memcmp(), std::memset() */ 13 | #include /* for std::swap() */ 14 | 15 | namespace rfc3174 { 16 | struct sha1_digest; 17 | } 18 | 19 | /** 20 | * Represents a SHA-1 digest. 21 | */ 22 | struct rfc3174::sha1_digest { 23 | public: 24 | static constexpr std::size_t size = 20; /* 20 bytes (160 bits) */ 25 | 26 | /** 27 | * Computes the SHA-1 digest of the given NUL-terminated input string. 28 | */ 29 | static sha1_digest compute(const char* data) noexcept; 30 | 31 | /** 32 | * Computes the SHA-1 digest of the given input data. 33 | */ 34 | static sha1_digest compute(const std::uint8_t* data, std::size_t size) noexcept; 35 | 36 | /** 37 | * Default constructor. The structure is all zeroes after construction. 38 | */ 39 | sha1_digest() noexcept {} 40 | 41 | /** 42 | * Constructor. 43 | */ 44 | sha1_digest(const std::uint8_t* const data) noexcept { 45 | *_data = *data; 46 | } 47 | 48 | /** 49 | * Copy constructor. 50 | */ 51 | sha1_digest(const sha1_digest& other) noexcept { 52 | *_data = *other._data; 53 | } 54 | 55 | /** 56 | * Move constructor. 57 | */ 58 | sha1_digest(sha1_digest&& other) noexcept { 59 | std::swap(_data, other._data); 60 | } 61 | 62 | /** 63 | * Destructor. 64 | */ 65 | ~sha1_digest() noexcept {} 66 | 67 | /** 68 | * Copy assignment operator. 69 | */ 70 | sha1_digest& operator=(sha1_digest other) noexcept { 71 | std::swap(_data, other._data); 72 | return *this; 73 | } 74 | 75 | /** 76 | * Move assignment operator. 77 | */ 78 | sha1_digest& operator=(sha1_digest&& other) noexcept { 79 | std::swap(_data, other._data); 80 | return *this; 81 | } 82 | 83 | /** 84 | * Equality operator. 85 | */ 86 | bool operator==(const sha1_digest& other) const { 87 | return compare(other) == 0; 88 | } 89 | 90 | /** 91 | * Inequality operator. 92 | */ 93 | bool operator!=(const sha1_digest& other) const { 94 | return compare(other) != 0; 95 | } 96 | 97 | /** 98 | * Less-than operator. 99 | */ 100 | bool operator<(const sha1_digest& other) const { 101 | return compare(other) < 0; 102 | } 103 | 104 | /** 105 | * Less-than-or-equal-to operator. 106 | */ 107 | bool operator<=(const sha1_digest& other) const { 108 | return compare(other) <= 0; 109 | } 110 | 111 | /** 112 | * Greater-than operator. 113 | */ 114 | bool operator>(const sha1_digest& other) const { 115 | return compare(other) > 0; 116 | } 117 | 118 | /** 119 | * Greater-than-or-equal-to operator. 120 | */ 121 | bool operator>=(const sha1_digest& other) const { 122 | return compare(other) >= 0; 123 | } 124 | 125 | /** 126 | * Returns a reference to the byte at the given position. 127 | */ 128 | std::uint8_t& operator[](const std::size_t position) noexcept { 129 | return _data[position]; 130 | } 131 | 132 | /** 133 | * Returns a reference to the byte at the given position. 134 | */ 135 | const std::uint8_t& operator[](const std::size_t position) const noexcept { 136 | return _data[position]; 137 | } 138 | 139 | /** 140 | * Returns a pointer to the digest data. 141 | */ 142 | std::uint8_t* data() { 143 | return _data; 144 | } 145 | 146 | /** 147 | * Returns a pointer to the digest data. 148 | */ 149 | const std::uint8_t* data() const { 150 | return _data; 151 | } 152 | 153 | /** 154 | * Returns a reference to the first byte of the digest data. 155 | */ 156 | std::uint8_t& front() { 157 | return operator[](0); 158 | } 159 | 160 | /** 161 | * Returns a reference to the first byte of the digest data. 162 | */ 163 | const std::uint8_t& front() const { 164 | return operator[](0); 165 | } 166 | 167 | /** 168 | * Returns a reference to the last byte of the digest data. 169 | */ 170 | std::uint8_t& back() { 171 | return operator[](size - 1); 172 | } 173 | 174 | /** 175 | * Returns a reference to the last byte of the digest data. 176 | */ 177 | const std::uint8_t& back() const { 178 | return operator[](size - 1); 179 | } 180 | 181 | /** 182 | * Compares this digest to the given other digest. 183 | */ 184 | inline int compare(const sha1_digest& other) const noexcept { 185 | return std::memcmp(_data, other._data, sizeof(_data)); 186 | } 187 | 188 | /** 189 | * Clears the digest data to be all zeroes. 190 | */ 191 | void clear() noexcept { 192 | std::memset(_data, 0, sizeof(_data)); 193 | } 194 | 195 | /** 196 | * Exchanges the digest data with the given other digest. 197 | */ 198 | void swap(sha1_digest& other) noexcept { 199 | std::swap(_data, other._data); 200 | } 201 | 202 | protected: 203 | std::uint8_t _data[size] = {}; 204 | }; 205 | 206 | #endif /* RFC_RFC3174_SHA1_DIGEST_H */ 207 | -------------------------------------------------------------------------------- /src/rfc/rfc3629.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC3629_H 4 | #define RFC_RFC3629_H 5 | 6 | /** 7 | * @file 8 | * 9 | * An implementation of RFC 3629: UTF-8, a transformation format of ISO 10646. 10 | * 11 | * @see http://tools.ietf.org/html/rfc3629 12 | */ 13 | 14 | #include "rfc3629/utf8_decode.h" 15 | #include "rfc3629/utf8_encode.h" 16 | 17 | #endif /* RFC_RFC3629_H */ 18 | -------------------------------------------------------------------------------- /src/rfc/rfc3629/utf8_decode.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifdef HAVE_CONFIG_H 4 | #include 5 | #endif 6 | 7 | #include "utf8.h" 8 | 9 | using namespace rfc3629; 10 | 11 | /** 12 | * Lookup table for `utf8_skip_char()`. 13 | * 14 | * @see http://en.wikipedia.org/wiki/UTF-8#Codepage_layout 15 | */ 16 | extern const std::uint8_t utf8_skip_table[256] = { 17 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x00..0x0F */ 18 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x10..0x1F */ 19 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x20..0x2F */ 20 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x30..0x3F */ 21 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x40..0x4F */ 22 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x50..0x5F */ 23 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x60..0x6F */ 24 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x70..0x7F */ 25 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x80..0x8F */ 26 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x90..0x9F */ 27 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xA0..0xAF */ 28 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0xB0..0xBF */ 29 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0xC0..0xCF */ 30 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0xD0..0xDF */ 31 | 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0xE0..0xEF */ 32 | 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 1, 1, /* 0xF0..0xFF */ 33 | }; 34 | 35 | /** 36 | * Lookup table for `utf8_decode().` 37 | */ 38 | extern const std::uint8_t utf8_decode_table[64] = { 39 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 40 | 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 41 | 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 42 | 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 43 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 44 | 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 45 | 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 46 | 0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x00, 0x00, 47 | }; 48 | -------------------------------------------------------------------------------- /src/rfc/rfc3629/utf8_decode.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC3629_UTF8_DECODE_H 4 | #define RFC_RFC3629_UTF8_DECODE_H 5 | 6 | /** 7 | * @file 8 | */ 9 | 10 | #include /* for std::size_t */ 11 | #include /* for std::uint*_t, std::uintptr_t */ 12 | 13 | namespace rfc3629 { 14 | /** 15 | * Lookup table for UTF-8 parsing. 16 | */ 17 | extern const std::uint8_t utf8_skip_table[256]; 18 | 19 | /** 20 | * Lookup table for UTF-8 decoding. 21 | */ 22 | extern const std::uint8_t utf8_decode_table[64]; 23 | 24 | /** 25 | */ 26 | static inline const char* utf8_skip_char(const char* const input) noexcept { 27 | return input + utf8_skip_table[*reinterpret_cast(input)]; 28 | } 29 | 30 | /** 31 | */ 32 | static inline char* utf8_skip_char(char* const input) noexcept { 33 | return input + utf8_skip_table[*reinterpret_cast(input)]; 34 | } 35 | 36 | /** 37 | * Decodes a single Unicode code point from UTF-8 input. 38 | * 39 | * @param input the UTF-8 input string 40 | * @return the decoded Unicode code point 41 | */ 42 | static inline std::uint32_t utf8_decode(const char* const input_) noexcept { 43 | const std::uint8_t* input = reinterpret_cast(input_); 44 | std::uint32_t c = *input++; 45 | if (c >= 0xC0) { 46 | c = utf8_decode_table[c - 0xC0]; 47 | while ((*input & 0xC0) == 0x80) { 48 | c = (c << 6) + (*input++ & 0x3F); 49 | } 50 | if ((c < 0x80) || 51 | (c & 0xFFFFF800) == 0xD800 || 52 | (c & 0xFFFFFFFE) == 0xFFFE) { 53 | c = 0xFFFD; /* replacement character (U+FFFD) */ 54 | } 55 | } 56 | return c; 57 | } 58 | } 59 | 60 | #endif /* RFC_RFC3629_UTF8_DECODE_H */ 61 | -------------------------------------------------------------------------------- /src/rfc/rfc3629/utf8_encode.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifdef HAVE_CONFIG_H 4 | #include 5 | #endif 6 | 7 | #include "utf8.h" 8 | 9 | using namespace rfc3629; 10 | -------------------------------------------------------------------------------- /src/rfc/rfc3629/utf8_encode.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC3629_UTF8_ENCODE_H 4 | #define RFC_RFC3629_UTF8_ENCODE_H 5 | 6 | /** 7 | * @file 8 | */ 9 | 10 | #include /* for std::size_t */ 11 | #include /* for std::uint*_t, std::uintptr_t */ 12 | 13 | namespace rfc3629 { 14 | /** 15 | * @param c a Unicode code point 16 | * @return the number of bytes needed 17 | */ 18 | static inline constexpr std::size_t utf8_length(const std::uint32_t c) noexcept { 19 | return (c < 0x00080) ? 1 : (c < 0x00800) ? 2 : (c < 0x10000) ? 3 : 4; 20 | } 21 | 22 | /** 23 | * Encodes a single Unicode code point as UTF-8. 24 | * 25 | * The given output buffer must have at least 4 bytes of space. 26 | * 27 | * @param c the Unicode code point to encode 28 | * @param buffer the UTF-8 output buffer 29 | * @return the number of bytes written 30 | */ 31 | static inline std::size_t utf8_encode(const std::uint32_t c, char* const buffer) noexcept { 32 | std::uint8_t* output = reinterpret_cast(buffer); 33 | if (c < 0x00080) { 34 | *output++ = static_cast(c & 0xFF); 35 | } 36 | else if (c < 0x00800) { 37 | *output++ = 0xC0 + static_cast((c >> 6) & 0x1F); 38 | *output++ = 0x80 + static_cast(c & 0x3F); 39 | } 40 | else if (c < 0x10000) { 41 | *output++ = 0xE0 + static_cast((c >> 12) & 0x0F); 42 | *output++ = 0x80 + static_cast((c >> 6) & 0x3F); 43 | *output++ = 0x80 + static_cast(c & 0x3F); 44 | } 45 | else { 46 | *output++ = 0xF0 + static_cast((c >> 18) & 0x07); 47 | *output++ = 0x80 + static_cast((c >> 12) & 0x3F); 48 | *output++ = 0x80 + static_cast((c >> 6) & 0x3F); 49 | *output++ = 0x80 + static_cast(c & 0x3F); 50 | } 51 | return reinterpret_cast(output) - 52 | reinterpret_cast(buffer); 53 | } 54 | } 55 | 56 | #endif /* RFC_RFC3629_UTF8_ENCODE_H */ 57 | -------------------------------------------------------------------------------- /src/rfc/rfc3986.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC3986_H 4 | #define RFC_RFC3986_H 5 | 6 | /** 7 | * @file 8 | * 9 | * An implementation of RFC 3986: 10 | * Uniform Resource Identifier (URI): Generic Syntax. 11 | * 12 | * @see http://tools.ietf.org/html/rfc3986 13 | */ 14 | 15 | #include "rfc3986/uri.h" 16 | 17 | #endif /* RFC_RFC3986_H */ 18 | -------------------------------------------------------------------------------- /src/rfc/rfc3986/uri.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifdef HAVE_CONFIG_H 4 | #include 5 | #endif 6 | 7 | #include "uri.h" 8 | -------------------------------------------------------------------------------- /src/rfc/rfc3986/uri.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC3986_URI_H 4 | #define RFC_RFC3986_URI_H 5 | 6 | /** 7 | * @file 8 | */ 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #ifdef __cplusplus 15 | } /* extern "C" */ 16 | #endif 17 | 18 | #endif /* RFC_RFC3986_URI_H */ 19 | -------------------------------------------------------------------------------- /src/rfc/rfc4122.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC4122_H 4 | #define RFC_RFC4122_H 5 | 6 | /** 7 | * @file 8 | * 9 | * An implementation of RFC 4122: 10 | * A Universally Unique IDentifier (UUID) URN Namespace. 11 | * 12 | * @see http://tools.ietf.org/html/rfc4122 13 | */ 14 | 15 | #include "rfc4122/uuid.h" 16 | 17 | #endif /* RFC_RFC4122_H */ 18 | -------------------------------------------------------------------------------- /src/rfc/rfc4122/uuid.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifdef HAVE_CONFIG_H 4 | #include 5 | #endif 6 | 7 | #include "uuid.h" 8 | -------------------------------------------------------------------------------- /src/rfc/rfc4122/uuid.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC4122_UUID_H 4 | #define RFC_RFC4122_UUID_H 5 | 6 | /** 7 | * @file 8 | */ 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #ifdef __cplusplus 15 | } /* extern "C" */ 16 | #endif 17 | 18 | #endif /* RFC_RFC4122_UUID_H */ 19 | -------------------------------------------------------------------------------- /src/rfc/rfc4627.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC4627_H 4 | #define RFC_RFC4627_H 5 | 6 | /** 7 | * @file 8 | * 9 | * An implementation of RFC 4627: JavaScript Object Notation (JSON). 10 | * 11 | * @see http://tools.ietf.org/html/rfc4627 12 | */ 13 | 14 | #include "rfc4627/json_array.h" 15 | #include "rfc4627/json_boolean.h" 16 | #include "rfc4627/json_number.h" 17 | #include "rfc4627/json_object.h" 18 | #include "rfc4627/json_reader.h" 19 | #include "rfc4627/json_string.h" 20 | #include "rfc4627/json_value.h" 21 | #include "rfc4627/json_writer.h" 22 | 23 | #endif /* RFC_RFC4627_H */ 24 | -------------------------------------------------------------------------------- /src/rfc/rfc4627/json_array.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifdef HAVE_CONFIG_H 4 | #include 5 | #endif 6 | 7 | #include "json_array.h" 8 | -------------------------------------------------------------------------------- /src/rfc/rfc4627/json_array.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC4627_JSON_ARRAY_H 4 | #define RFC_RFC4627_JSON_ARRAY_H 5 | 6 | /** 7 | * @file 8 | */ 9 | 10 | #include "json_value.h" 11 | 12 | namespace rfc4627 { 13 | class json_array : public json_value { 14 | // TODO 15 | }; 16 | } 17 | 18 | #endif /* RFC_RFC4627_JSON_ARRAY_H */ 19 | -------------------------------------------------------------------------------- /src/rfc/rfc4627/json_boolean.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifdef HAVE_CONFIG_H 4 | #include 5 | #endif 6 | 7 | #include "json_boolean.h" 8 | -------------------------------------------------------------------------------- /src/rfc/rfc4627/json_boolean.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC4627_JSON_BOOLEAN_H 4 | #define RFC_RFC4627_JSON_BOOLEAN_H 5 | 6 | /** 7 | * @file 8 | */ 9 | 10 | #include "json_value.h" 11 | 12 | namespace rfc4627 { 13 | class json_boolean : public json_value { 14 | // TODO 15 | }; 16 | } 17 | 18 | #endif /* RFC_RFC4627_JSON_BOOLEAN_H */ 19 | -------------------------------------------------------------------------------- /src/rfc/rfc4627/json_number.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifdef HAVE_CONFIG_H 4 | #include 5 | #endif 6 | 7 | #include "json_number.h" 8 | -------------------------------------------------------------------------------- /src/rfc/rfc4627/json_number.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC4627_JSON_NUMBER_H 4 | #define RFC_RFC4627_JSON_NUMBER_H 5 | 6 | /** 7 | * @file 8 | */ 9 | 10 | #include "json_value.h" 11 | 12 | namespace rfc4627 { 13 | class json_number : public json_value { 14 | // TODO 15 | }; 16 | } 17 | 18 | #endif /* RFC_RFC4627_JSON_NUMBER_H */ 19 | -------------------------------------------------------------------------------- /src/rfc/rfc4627/json_object.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifdef HAVE_CONFIG_H 4 | #include 5 | #endif 6 | 7 | #include "json_object.h" 8 | -------------------------------------------------------------------------------- /src/rfc/rfc4627/json_object.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC4627_JSON_OBJECT_H 4 | #define RFC_RFC4627_JSON_OBJECT_H 5 | 6 | /** 7 | * @file 8 | */ 9 | 10 | #include "json_value.h" 11 | 12 | namespace rfc4627 { 13 | class json_object : public json_value { 14 | // TODO 15 | }; 16 | } 17 | 18 | #endif /* RFC_RFC4627_JSON_OBJECT_H */ 19 | -------------------------------------------------------------------------------- /src/rfc/rfc4627/json_reader.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifdef HAVE_CONFIG_H 4 | #include 5 | #endif 6 | 7 | #include "json_reader.h" 8 | -------------------------------------------------------------------------------- /src/rfc/rfc4627/json_reader.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC4627_JSON_READER_H 4 | #define RFC_RFC4627_JSON_READER_H 5 | 6 | /** 7 | * @file 8 | */ 9 | 10 | namespace rfc4627 { 11 | class json_reader { 12 | }; 13 | } 14 | 15 | #endif /* RFC_RFC4627_JSON_READER_H */ 16 | -------------------------------------------------------------------------------- /src/rfc/rfc4627/json_string.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifdef HAVE_CONFIG_H 4 | #include 5 | #endif 6 | 7 | #include "json_string.h" 8 | -------------------------------------------------------------------------------- /src/rfc/rfc4627/json_string.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC4627_JSON_STRING_H 4 | #define RFC_RFC4627_JSON_STRING_H 5 | 6 | /** 7 | * @file 8 | */ 9 | 10 | #include "json_value.h" 11 | 12 | namespace rfc4627 { 13 | class json_string : public json_value { 14 | // TODO 15 | }; 16 | } 17 | 18 | #endif /* RFC_RFC4627_JSON_STRING_H */ 19 | -------------------------------------------------------------------------------- /src/rfc/rfc4627/json_value.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifdef HAVE_CONFIG_H 4 | #include 5 | #endif 6 | 7 | #include "json_value.h" 8 | -------------------------------------------------------------------------------- /src/rfc/rfc4627/json_value.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC4627_JSON_VALUE_H 4 | #define RFC_RFC4627_JSON_VALUE_H 5 | 6 | /** 7 | * @file 8 | */ 9 | 10 | namespace rfc4627 { 11 | class json_value { 12 | }; 13 | } 14 | 15 | #endif /* RFC_RFC4627_JSON_VALUE_H */ 16 | -------------------------------------------------------------------------------- /src/rfc/rfc4627/json_writer.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifdef HAVE_CONFIG_H 4 | #include 5 | #endif 6 | 7 | #include "json_writer.h" 8 | 9 | #include /* for assert() */ 10 | #include /* for std::isinf(), std::isnan() */ 11 | #include /* for std::fflush(), std::fprintf() */ 12 | #include /* for std::invalid_argument, std::*_error */ 13 | 14 | using namespace rfc4627; 15 | 16 | json_writer& 17 | json_writer::begin_object() { 18 | ensure_valid_state(); 19 | reject_object_key(); 20 | 21 | insert_separator(); 22 | insert_whitespace(); 23 | 24 | increment_depth(); 25 | _state[_depth] = state::object_begin; 26 | 27 | write('{'); 28 | if (_flags.pretty) { 29 | write('\n'); 30 | } 31 | 32 | return *this; 33 | } 34 | 35 | json_writer& 36 | json_writer::finish_object() { 37 | ensure_valid_state(); 38 | decrement_depth(); 39 | 40 | if (_flags.pretty) { 41 | write('\n'); 42 | } 43 | 44 | transition_state(); 45 | 46 | insert_whitespace(); 47 | 48 | write('}'); 49 | 50 | return *this; 51 | } 52 | 53 | json_writer& 54 | json_writer::begin_array() { 55 | ensure_valid_state(); 56 | reject_object_key(); 57 | 58 | insert_separator(); 59 | insert_whitespace(); 60 | 61 | increment_depth(); 62 | _state[_depth] = state::array_begin; 63 | 64 | write('['); 65 | if (_flags.pretty) { 66 | write('\n'); 67 | } 68 | 69 | return *this; 70 | } 71 | 72 | json_writer& 73 | json_writer::finish_array() { 74 | ensure_valid_state(); 75 | decrement_depth(); 76 | 77 | if (_flags.pretty) { 78 | write('\n'); 79 | } 80 | 81 | transition_state(); 82 | 83 | insert_whitespace(); 84 | 85 | write(']'); 86 | 87 | return *this; 88 | } 89 | 90 | json_writer& 91 | json_writer::write_null() { 92 | ensure_valid_state(); 93 | reject_object_key(); 94 | 95 | insert_separator(); 96 | insert_whitespace(); 97 | 98 | write("null"); 99 | 100 | transition_state(); 101 | 102 | return *this; 103 | } 104 | 105 | json_writer& 106 | json_writer::write_boolean(const bool value) { 107 | ensure_valid_state(); 108 | reject_object_key(); 109 | 110 | insert_separator(); 111 | insert_whitespace(); 112 | 113 | write(value ? "true" : "false"); 114 | 115 | transition_state(); 116 | 117 | return *this; 118 | } 119 | 120 | json_writer& 121 | json_writer::write_integer(const long long value) { 122 | ensure_valid_state(); 123 | reject_object_key(); 124 | 125 | insert_separator(); 126 | insert_whitespace(); 127 | 128 | std::fprintf(_stream, "%lld", value); 129 | 130 | transition_state(); 131 | 132 | return *this; 133 | } 134 | 135 | json_writer& 136 | json_writer::write_number(const double value) { 137 | ensure_valid_state(); 138 | reject_object_key(); 139 | 140 | /* Numeric values that cannot be represented as sequences of digits 141 | * (such as Infinity and NaN) are not permitted. */ 142 | if (std::isinf(value)) { 143 | throw std::invalid_argument("Infinity cannot be represented in JSON serialization"); 144 | } 145 | if (std::isnan(value)) { 146 | throw std::invalid_argument("NaN cannot be represented in JSON serialization"); 147 | } 148 | 149 | insert_separator(); 150 | insert_whitespace(); 151 | 152 | std::fprintf(_stream, "%.20g", value); 153 | 154 | transition_state(); 155 | 156 | return *this; 157 | } 158 | 159 | json_writer& 160 | json_writer::write_string(const char* const value) { 161 | ensure_valid_state(); 162 | insert_separator(); 163 | insert_whitespace(); 164 | 165 | if (value == nullptr) { 166 | return write_null(); 167 | } 168 | 169 | write('"'); 170 | const char* s = value; 171 | while (*s != '\0') { 172 | write_char(*s++); 173 | } 174 | write('"'); 175 | 176 | transition_state(); 177 | 178 | return *this; 179 | } 180 | 181 | void 182 | json_writer::write_char(const std::uint8_t value) noexcept { 183 | switch (value) { 184 | case '"': /* U+0022 quotation mark */ 185 | write("\\\""); 186 | break; 187 | case '\\': /* U+005C reverse solidus */ 188 | write("\\\\"); 189 | break; 190 | case '/': /* U+002F solidus */ 191 | write("\\/"); 192 | break; 193 | case '\b': /* U+0008 backspace */ 194 | write("\\b"); 195 | break; 196 | case '\f': /* U+000C form feed */ 197 | write("\\f"); 198 | break; 199 | case '\n': /* U+000A line feed */ 200 | write("\\n"); 201 | break; 202 | case '\r': /* U+000D carriage return */ 203 | write("\\r"); 204 | break; 205 | case '\t': /* U+0009 tab */ 206 | write("\\t"); 207 | break; 208 | default: 209 | if (value <= 0x1F) { /* ASCII control character */ 210 | write("\\u"); 211 | std::fprintf(_stream, "%04X", value); 212 | } 213 | else { /* UTF-8 character */ 214 | write(value); 215 | } 216 | } 217 | } 218 | 219 | json_writer& 220 | json_writer::flush() { 221 | if (std::fflush(_stream) != 0) { 222 | // TODO: error handling 223 | } 224 | 225 | return *this; 226 | } 227 | 228 | void 229 | json_writer::increment_depth() { 230 | if (++_depth >= max_depth) { 231 | throw std::overflow_error("maximum nesting depth exceeded in JSON serialization"); 232 | } 233 | } 234 | 235 | void 236 | json_writer::decrement_depth() { 237 | assert(_depth >= 1); 238 | if (--_depth >= max_depth) { /* wraps around */ 239 | throw std::logic_error("mismatched begin/finish nesting in JSON serialization"); 240 | } 241 | } 242 | 243 | void 244 | json_writer::ensure_valid_state() { 245 | switch (_state[_depth]) { 246 | case state::error: 247 | throw std::logic_error("error state encountered in JSON serialization"); 248 | case state::finish: 249 | throw std::logic_error("output already finished in JSON serialization"); 250 | default: 251 | break; 252 | } 253 | } 254 | 255 | void 256 | json_writer::transition_state() { 257 | switch (_state[_depth]) { 258 | case state::begin: 259 | _state[_depth] = state::finish; 260 | break; 261 | case state::object_begin: 262 | case state::object_key: 263 | _state[_depth] = state::object_value; 264 | break; 265 | case state::object_value: 266 | _state[_depth] = state::object_key; 267 | break; 268 | case state::array_begin: 269 | _state[_depth] = state::array_element; 270 | break; 271 | default: 272 | break; 273 | } 274 | } 275 | 276 | void 277 | json_writer::reject_object_key() { 278 | switch (_state[_depth]) { 279 | case state::object_begin: 280 | case state::object_key: 281 | throw std::logic_error("object keys must be strings in JSON serialization"); 282 | default: 283 | break; 284 | } 285 | } 286 | 287 | void 288 | json_writer::insert_separator() { 289 | switch (_state[_depth]) { 290 | case state::object_key: 291 | case state::array_element: 292 | write(','); 293 | if (_flags.pretty) { 294 | write('\n'); 295 | } 296 | break; 297 | case state::object_value: 298 | write(':'); 299 | if (_flags.pretty) { 300 | write(' '); 301 | } 302 | break; 303 | default: 304 | break; 305 | } 306 | } 307 | 308 | void 309 | json_writer::insert_whitespace() { 310 | if (_flags.pretty) { 311 | if (_state[_depth] != state::object_value) { 312 | for (auto i = 0U; i < _depth; i++) { 313 | write(_indent); 314 | } 315 | } 316 | } 317 | } 318 | -------------------------------------------------------------------------------- /src/rfc/rfc4627/json_writer.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_RFC4627_JSON_WRITER_H 4 | #define RFC_RFC4627_JSON_WRITER_H 5 | 6 | /** 7 | * @file 8 | */ 9 | 10 | #include /* for FILE, std::fput*() */ 11 | #include /* for std::size_t */ 12 | #include /* for std::uint*_t */ 13 | #include /* for std::string */ 14 | 15 | namespace rfc4627 { 16 | class json_writer; 17 | } 18 | 19 | /** 20 | * A simple JSON serializer. 21 | */ 22 | class rfc4627::json_writer { 23 | public: 24 | static constexpr std::size_t max_depth = 40; 25 | 26 | json_writer(FILE* stream) : _stream(stream) {} 27 | 28 | json_writer& begin_object(); 29 | 30 | json_writer& finish_object(); 31 | 32 | json_writer& begin_array(); 33 | 34 | json_writer& finish_array(); 35 | 36 | json_writer& write_null(); 37 | 38 | json_writer& write_boolean(bool value); 39 | 40 | json_writer& write_integer(long long value); 41 | 42 | json_writer& write_number(double value); 43 | 44 | json_writer& write_string(const char* string); 45 | 46 | template 47 | json_writer& write_strings(T string) { 48 | return write_string(string); 49 | } 50 | 51 | template 52 | json_writer& write_strings(T string, Args... args) { 53 | write_string(string); 54 | return write_strings(args...); 55 | } 56 | 57 | inline json_writer& write_string(const std::string& string) { 58 | write(string.c_str()); 59 | return *this; 60 | } 61 | 62 | #ifdef RFC_RFC4627_JSON_VALUE_H 63 | inline json_writer& write(const json_object& value) { 64 | return (void)value, *this; // TODO 65 | } 66 | 67 | inline json_writer& write(const json_array& value) { 68 | return (void)value, *this; // TODO 69 | } 70 | 71 | inline json_writer& write(const std::nullptr_t value) { 72 | return (void)value, write_null(); 73 | } 74 | 75 | inline json_writer& write(const json_boolean& value) { 76 | return (void)value, *this; // TODO 77 | } 78 | 79 | inline json_writer& write(const json_number& value) { 80 | return (void)value, *this; // TODO 81 | } 82 | 83 | inline json_writer& write(const json_string& value) { 84 | return (void)value, *this; // TODO 85 | } 86 | #endif /* RFC_RFC4627_JSON_VALUE_H */ 87 | 88 | json_writer& flush(); 89 | 90 | protected: 91 | struct flags { 92 | bool pretty : 1; 93 | }; 94 | 95 | enum class state : std::uint8_t { 96 | begin = 0, 97 | object_begin, 98 | object_key, 99 | object_value, 100 | array_begin, 101 | array_element, 102 | finish, 103 | error, 104 | }; 105 | 106 | void write_char(std::uint8_t value) noexcept; 107 | 108 | inline void write(const std::uint8_t c) { 109 | std::fputc(c, _stream); 110 | } 111 | 112 | inline void write(const char* const s) { 113 | std::fputs(s, _stream); 114 | } 115 | 116 | inline void increment_depth(); 117 | 118 | inline void decrement_depth(); 119 | 120 | inline void ensure_valid_state(); 121 | 122 | inline void reject_object_key(); 123 | 124 | inline void transition_state(); 125 | 126 | inline void insert_separator(); 127 | 128 | inline void insert_whitespace(); 129 | 130 | private: 131 | flags _flags = {true}; 132 | unsigned int _depth = 0; 133 | FILE* _stream = nullptr; 134 | const char* _indent = " "; 135 | state _state[max_depth] = {state::begin}; 136 | }; 137 | 138 | #endif /* RFC_RFC4627_JSON_WRITER_H */ 139 | -------------------------------------------------------------------------------- /src/rfc/sha1: -------------------------------------------------------------------------------- 1 | rfc3174 -------------------------------------------------------------------------------- /src/rfc/sha1.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_SHA1_H 4 | #define RFC_SHA1_H 5 | 6 | #include "rfc3174.h" /* RFC 3174: US Secure Hash Algorithm 1 (SHA-1) */ 7 | 8 | #endif /* RFC_SHA1_H */ 9 | -------------------------------------------------------------------------------- /src/rfc/uri: -------------------------------------------------------------------------------- 1 | rfc3986 -------------------------------------------------------------------------------- /src/rfc/uri.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_URI_H 4 | #define RFC_URI_H 5 | 6 | #include "rfc3986.h" /* RFC 3986: Uniform Resource Identifier (URI): Generic Syntax */ 7 | 8 | #endif /* RFC_URI_H */ 9 | -------------------------------------------------------------------------------- /src/rfc/utf8: -------------------------------------------------------------------------------- 1 | rfc3629 -------------------------------------------------------------------------------- /src/rfc/utf8.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_UTF8_H 4 | #define RFC_UTF8_H 5 | 6 | #include "rfc3629.h" /* RFC 3629: UTF-8, a transformation format of ISO 10646 */ 7 | 8 | #endif /* RFC_UTF8_H */ 9 | -------------------------------------------------------------------------------- /src/rfc/util/str.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_UTIL_STR_H 4 | #define RFC_UTIL_STR_H 5 | 6 | /** 7 | * @file 8 | */ 9 | 10 | #include /* for std::is*() */ 11 | #include /* for std::size_t */ 12 | #include /* for std::mem*(), std::str*() */ 13 | #include /* for std::out_of_range */ 14 | #include /* for std::string */ 15 | 16 | namespace rfc { 17 | class str; 18 | } 19 | 20 | /** 21 | * C string wrapper class. 22 | * 23 | * @note Instances of this class are movable, but not copyable. 24 | */ 25 | class rfc::str { 26 | char* _data = nullptr; 27 | 28 | public: 29 | /** 30 | * Maximum value for `std::size_t`. 31 | */ 32 | static constexpr std::size_t npos = static_cast(-1); 33 | 34 | /** 35 | * Default constructor. 36 | */ 37 | str() noexcept {} 38 | 39 | /** 40 | * Constructor. 41 | */ 42 | explicit str(const std::string& string) noexcept 43 | : _data(const_cast(string.data())) {} 44 | 45 | /** 46 | * Constructor. 47 | */ 48 | explicit str(char* data) noexcept 49 | : _data(data) {} 50 | 51 | /** 52 | * Constructor. 53 | */ 54 | explicit str(const char* data) noexcept 55 | : _data(const_cast(data)) {} 56 | 57 | /** 58 | * Copy constructor. 59 | */ 60 | str(const str& other) noexcept = delete; 61 | 62 | /** 63 | * Move constructor. 64 | */ 65 | str(str&& other) noexcept = default; 66 | 67 | /** 68 | * Destructor. 69 | */ 70 | ~str() noexcept = default; 71 | 72 | /** 73 | * Copy assignment operator. 74 | */ 75 | str& operator=(const str& other) noexcept = delete; 76 | 77 | /** 78 | * Move assignment operator. 79 | */ 80 | str& operator=(str&& other) noexcept = default; 81 | 82 | /** 83 | * @name Iterators 84 | */ 85 | 86 | /**@{*/ 87 | 88 | /** 89 | * Returns a const-qualified iterator to the beginning of this string. 90 | */ 91 | const char* cbegin() const noexcept { 92 | return begin(); 93 | } 94 | 95 | /** 96 | * Returns a const-qualified iterator to the end of this string. 97 | */ 98 | const char* cend() const noexcept { 99 | return end(); 100 | } 101 | 102 | /** 103 | * Returns an iterator to the beginning of this string. 104 | */ 105 | char* begin() noexcept { 106 | return _data; 107 | } 108 | 109 | /** 110 | * Returns a const-qualified iterator to the beginning of this string. 111 | */ 112 | const char* begin() const noexcept { 113 | return _data; 114 | } 115 | 116 | /** 117 | * Returns an iterator to the end of this string. 118 | */ 119 | char* end() noexcept { 120 | return _data + size(); 121 | } 122 | 123 | /** 124 | * Returns a const-qualified iterator to the end of this string. 125 | */ 126 | const char* end() const noexcept { 127 | return _data + size(); 128 | } 129 | 130 | /**@}*/ 131 | 132 | /** 133 | * @name Capacity 134 | */ 135 | 136 | /**@{*/ 137 | 138 | /** 139 | * Tests whether this string is empty. 140 | * 141 | * The string is empty in case the data pointer is `nullptr` or the first 142 | * character of the string is NUL. 143 | */ 144 | bool empty() const noexcept { 145 | return _data == nullptr || _data[0] == '\0'; 146 | } 147 | 148 | /** 149 | * Clears this string by resetting the data pointer to `nullptr`. 150 | */ 151 | void clear() noexcept { 152 | _data = nullptr; 153 | } 154 | 155 | /** 156 | * Returns the byte length of this string. 157 | */ 158 | std::size_t length() const noexcept { 159 | return size(); 160 | } 161 | 162 | /** 163 | * Returns the byte length of this string. 164 | */ 165 | std::size_t size() const noexcept { 166 | return _data ? std::strlen(_data) : 0; 167 | } 168 | 169 | /**@}*/ 170 | 171 | /** 172 | * @name Element access 173 | */ 174 | 175 | /**@{*/ 176 | 177 | /** 178 | * Alias for `data()`. 179 | */ 180 | const char* c_str() const noexcept { 181 | return _data; 182 | } 183 | 184 | /** 185 | * Returns a pointer to the underlying C string data. 186 | */ 187 | const char* data() const noexcept { 188 | return _data; 189 | } 190 | 191 | /** 192 | * ... 193 | */ 194 | char& operator[](std::size_t pos) noexcept { 195 | return _data[pos]; 196 | } 197 | 198 | /** 199 | * ... 200 | */ 201 | const char& operator[](std::size_t pos) const noexcept { 202 | return _data[pos]; 203 | } 204 | 205 | /** 206 | * @throws std::out_of_range if `pos` >= `size()` 207 | */ 208 | char& at(std::size_t pos) { 209 | if (pos >= size()) throw std::out_of_range("pos >= size()"); 210 | return _data[pos]; 211 | } 212 | 213 | /** 214 | * @throws std::out_of_range if `pos` >= `size()` 215 | */ 216 | const char& at(std::size_t pos) const { 217 | if (pos >= size()) throw std::out_of_range("pos >= size()"); 218 | return _data[pos]; 219 | } 220 | 221 | /** 222 | * ... 223 | */ 224 | char& back() noexcept { 225 | return _data[size() - 1]; 226 | } 227 | 228 | /** 229 | * ... 230 | */ 231 | const char& back() const noexcept { 232 | return _data[size() - 1]; 233 | } 234 | 235 | /** 236 | * ... 237 | */ 238 | char& front() noexcept { 239 | return _data[0]; 240 | } 241 | 242 | /** 243 | * ... 244 | */ 245 | const char& front() const noexcept { 246 | return _data[0]; 247 | } 248 | 249 | /**@}*/ 250 | 251 | /** 252 | * @name Mutative operations 253 | */ 254 | 255 | /**@{*/ 256 | 257 | /** 258 | * Erases the last character of this string. 259 | */ 260 | void pop_back() noexcept { 261 | _data[size() - 1] = '\0'; 262 | } 263 | 264 | /**@}*/ 265 | 266 | /** 267 | * @name String operations 268 | */ 269 | 270 | /**@{*/ 271 | 272 | /** 273 | * Compares this string to another sequence of characters. 274 | */ 275 | int compare(const std::string& other) const noexcept { 276 | return compare(other.data()); 277 | } 278 | 279 | /** 280 | * Compares this string to another sequence of characters. 281 | */ 282 | int compare(const str& other) const noexcept { 283 | return compare(other.data()); 284 | } 285 | 286 | /** 287 | * Compares this string to another sequence of characters. 288 | */ 289 | int compare(const char* other) const noexcept { 290 | return std::strcmp(_data, other); 291 | } 292 | 293 | /** 294 | * Copies a sequence of characters into a given buffer. 295 | */ 296 | void copy(char* target, std::size_t length, std::size_t pos = 0) const { 297 | std::strncpy(target, _data + pos, length); 298 | } 299 | 300 | bool equal(const std::string& other) const noexcept { 301 | return compare(other) == 0; 302 | } 303 | 304 | bool equal(const str& other) const noexcept { 305 | return compare(other) == 0; 306 | } 307 | 308 | bool equal(const char* other) const noexcept { 309 | return compare(other) == 0; 310 | } 311 | 312 | /** 313 | * Finds the first occurrence of the given character. 314 | */ 315 | std::size_t find(char c, std::size_t pos = 0) const noexcept { 316 | const char* const found = std::strchr(_data + pos, c); 317 | return found ? found - _data : npos; 318 | } 319 | 320 | /** 321 | * Finds the first occurrence of the given string. 322 | */ 323 | std::size_t find(const char* s, std::size_t pos = 0) const noexcept { 324 | const char* const found = std::strstr(_data + pos, s); 325 | return found ? found - _data : npos; 326 | } 327 | 328 | /** 329 | * Finds the last occurrence of the given character. 330 | */ 331 | std::size_t rfind(char c, std::size_t pos = 0) const noexcept { 332 | const char* const found = std::strrchr(_data + pos, c); 333 | return found ? found - _data : npos; 334 | } 335 | 336 | /** 337 | * Returns a substring of this string. 338 | */ 339 | str substr(std::size_t pos) const noexcept { 340 | return str(_data + pos); 341 | } 342 | 343 | /** 344 | * Returns a substring of this string. 345 | */ 346 | str substr_from(char c) const noexcept { 347 | const auto pos = find(c); 348 | return (pos != npos) ? str(_data + pos) : str(); 349 | } 350 | 351 | /** 352 | * Returns a substring of this string. 353 | */ 354 | str substr_after(char c) const noexcept { 355 | const auto pos = find(c); 356 | return (pos != npos) ? str(_data + pos + 1) : str(); 357 | } 358 | 359 | /**@}*/ 360 | 361 | /** 362 | * @name Predicates 363 | */ 364 | 365 | /**@{*/ 366 | 367 | bool has_prefix(const char* prefix) const noexcept { 368 | return prefix && (find(prefix) == 0); 369 | } 370 | 371 | bool has_suffix(const char* suffix) const noexcept { 372 | const auto string_size = size(); 373 | const auto suffix_size = suffix ? std::strlen(suffix) : 0; 374 | return suffix && (string_size >= suffix_size) && 375 | (strcmp(_data + string_size - suffix_size, suffix) == 0); 376 | } 377 | 378 | bool is(int (*predicate)(const int chr)) const noexcept { 379 | const char* s = _data; 380 | while (*s != '\0') { 381 | if (!predicate(*s)) { 382 | return false; 383 | } 384 | s++; /* ASCII only */ 385 | } 386 | return true; 387 | } 388 | 389 | bool is_alnum() const noexcept { 390 | return is(isalnum); 391 | } 392 | 393 | bool is_alpha() const noexcept { 394 | return is(isalpha); 395 | } 396 | 397 | bool is_ascii() const noexcept { 398 | return is(isascii); 399 | } 400 | 401 | bool is_blank() const noexcept { 402 | return is(isblank); 403 | } 404 | 405 | bool is_cntrl() const noexcept { 406 | return is(iscntrl); 407 | } 408 | 409 | bool is_digit() const noexcept { 410 | return is(isdigit); 411 | } 412 | 413 | bool is_graph() const noexcept { 414 | return is(isgraph); 415 | } 416 | 417 | bool is_lower() const noexcept { 418 | return is(islower); 419 | } 420 | 421 | bool is_print() const noexcept { 422 | return is(isprint); 423 | } 424 | 425 | bool is_punct() const noexcept { 426 | return is(ispunct); 427 | } 428 | 429 | bool is_space() const noexcept { 430 | return is(isspace); 431 | } 432 | 433 | bool is_upper() const noexcept { 434 | return is(isupper); 435 | } 436 | 437 | bool is_xdigit() const noexcept { 438 | return is(isxdigit); 439 | } 440 | 441 | /**@}*/ 442 | }; 443 | 444 | #endif /* RFC_UTIL_STR_H */ 445 | -------------------------------------------------------------------------------- /src/rfc/uuid: -------------------------------------------------------------------------------- 1 | rfc4122 -------------------------------------------------------------------------------- /src/rfc/uuid.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_UUID_H 4 | #define RFC_UUID_H 5 | 6 | #include "rfc4122.h" /* RFC 4122: A Universally Unique IDentifier (UUID) URN Namespace */ 7 | 8 | #endif /* RFC_UUID_H */ 9 | -------------------------------------------------------------------------------- /src/rfc/version.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifdef HAVE_CONFIG_H 4 | #include 5 | #endif 6 | 7 | #include "version.h" 8 | 9 | const char* const rfc_version_string = RFC_VERSION_STRING; 10 | 11 | const short rfc_version_major = RFC_VERSION_MAJOR; 12 | 13 | const short rfc_version_minor = RFC_VERSION_MINOR; 14 | 15 | const short rfc_version_patch = RFC_VERSION_PATCH; 16 | -------------------------------------------------------------------------------- /src/rfc/version.h.in: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #ifndef RFC_VERSION_H 4 | #define RFC_VERSION_H 5 | 6 | /** 7 | * @file 8 | */ 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #define RFC_VERSION_STRING "@PACKAGE_VERSION@" 15 | #define RFC_VERSION_MAJOR @PACKAGE_VERSION_MAJOR@ 16 | #define RFC_VERSION_MINOR @PACKAGE_VERSION_MINOR@ 17 | #define RFC_VERSION_PATCH @PACKAGE_VERSION_PATCH@ 18 | 19 | /** 20 | * The librfc version as a NUL-terminated string. 21 | */ 22 | extern const char* const rfc_version_string; 23 | 24 | /** 25 | * The librfc major version. 26 | */ 27 | extern const short rfc_version_major; 28 | 29 | /** 30 | * The librfc minor version. 31 | */ 32 | extern const short rfc_version_minor; 33 | 34 | /** 35 | * The librfc patch level. 36 | */ 37 | extern const short rfc_version_patch; 38 | 39 | #ifdef __cplusplus 40 | } /* extern "C" */ 41 | #endif 42 | 43 | #endif /* RFC_VERSION_H */ 44 | -------------------------------------------------------------------------------- /test/.gitignore: -------------------------------------------------------------------------------- 1 | .deps/ 2 | .libs/ 3 | .dirstamp 4 | *.a 5 | *.o 6 | *.la 7 | *.lo 8 | *.log 9 | *.trs 10 | check_feature 11 | check_http 12 | check_json 13 | check_md5 14 | check_module 15 | check_sha1 16 | check_uri 17 | check_utf8 18 | check_util_str 19 | check_uuid 20 | check_version 21 | -------------------------------------------------------------------------------- /test/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS += $(TEST_CPPFLAGS) 2 | AM_CXXFLAGS += $(TEST_CXXFLAGS) 3 | AM_LDFLAGS += $(TEST_LDFLAGS) 4 | 5 | LDADD = $(top_srcdir)/src/rfc/librfc.la 6 | 7 | check_PROGRAMS = \ 8 | check_feature \ 9 | check_module \ 10 | check_version \ 11 | check_util_str 12 | 13 | if !DISABLE_RFC1321 14 | check_PROGRAMS += check_md5 15 | endif 16 | 17 | if !DISABLE_RFC2616 18 | check_PROGRAMS += check_http 19 | endif 20 | 21 | if !DISABLE_RFC3174 22 | check_PROGRAMS += check_sha1 23 | endif 24 | 25 | if !DISABLE_RFC3629 26 | check_PROGRAMS += check_utf8 27 | endif 28 | 29 | if !DISABLE_RFC3986 30 | check_PROGRAMS += check_uri 31 | endif 32 | 33 | if !DISABLE_RFC4122 34 | check_PROGRAMS += check_uuid 35 | endif 36 | 37 | if !DISABLE_RFC4627 38 | check_PROGRAMS += check_json 39 | endif 40 | 41 | TESTS = $(check_PROGRAMS) 42 | 43 | AM_DEFAULT_SOURCE_EXT = .cc 44 | -------------------------------------------------------------------------------- /test/check_feature.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #include "catch.hpp" 4 | 5 | #include 6 | 7 | TEST_CASE("test_feature") { 8 | // TODO 9 | } 10 | -------------------------------------------------------------------------------- /test/check_http.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #include "catch.hpp" 4 | 5 | #include 6 | 7 | TEST_CASE("test_http") { 8 | // TODO 9 | } 10 | -------------------------------------------------------------------------------- /test/check_json.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #include "catch.hpp" 4 | 5 | #include 6 | 7 | using namespace rfc4627; 8 | 9 | TEST_CASE("test_json_writer") { 10 | // @see http://tools.ietf.org/html/rfc4627#section-8 11 | json_writer json(stdout); 12 | json.begin_object(); 13 | { 14 | json.write_string("Image"); 15 | json.begin_object(); 16 | { 17 | json.write_string("Width"); 18 | json.write_integer(800); 19 | json.write_string("Height"); 20 | json.write_integer(600); 21 | json.write_strings("Title", "View from 15th Floor"); 22 | json.write_string("Thumbnail"); 23 | json.begin_object(); 24 | { 25 | json.write_strings("Url", "http://www.example.com/image/481989943"); 26 | json.write_string("Height"); 27 | json.write_integer(125); 28 | json.write_string("Width"); 29 | json.write_string("100"); 30 | } 31 | json.finish_object(); 32 | json.write_string("IDs"); 33 | json.begin_array(); 34 | { 35 | json.write_integer(116); 36 | json.write_integer(943); 37 | json.write_integer(234); 38 | json.write_integer(38793); 39 | } 40 | json.finish_array(); 41 | } 42 | json.finish_object(); 43 | } 44 | json.finish_object(); 45 | } 46 | -------------------------------------------------------------------------------- /test/check_md5.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #include "catch.hpp" 4 | 5 | #include 6 | 7 | TEST_CASE("test_md5") { 8 | // TODO 9 | } 10 | -------------------------------------------------------------------------------- /test/check_module.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #include "catch.hpp" 4 | 5 | #include 6 | 7 | TEST_CASE("test_module") { 8 | // TODO 9 | } 10 | -------------------------------------------------------------------------------- /test/check_sha1.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #include "catch.hpp" 4 | 5 | #include 6 | 7 | TEST_CASE("test_sha1") { 8 | // TODO 9 | } 10 | -------------------------------------------------------------------------------- /test/check_uri.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #include "catch.hpp" 4 | 5 | #include 6 | 7 | TEST_CASE("test_uri") { 8 | // TODO 9 | } 10 | -------------------------------------------------------------------------------- /test/check_utf8.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #include "catch.hpp" 4 | 5 | #include 6 | 7 | TEST_CASE("test_utf8") { 8 | // TODO 9 | } 10 | -------------------------------------------------------------------------------- /test/check_util_str.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #include "catch.hpp" 4 | 5 | #include 6 | 7 | #include /* for std::numeric_limits */ 8 | 9 | static const char* const hello = "Hello, world!\n"; 10 | static const std::size_t hello_size = 14; 11 | 12 | using namespace rfc; 13 | 14 | TEST_CASE("test_npos") { 15 | //REQUIRE(str::npos == std::numeric_limits::max()); // FIXME 16 | } 17 | 18 | TEST_CASE("test_ctor") { 19 | REQUIRE_NOTHROW(str()); 20 | REQUIRE_NOTHROW(str("")); 21 | REQUIRE_NOTHROW(str(hello)); 22 | } 23 | 24 | TEST_CASE("test_cbegin") { 25 | REQUIRE(str(hello).cbegin() == hello); 26 | } 27 | 28 | TEST_CASE("test_cend") { 29 | REQUIRE(str(hello).cend() == &hello[hello_size]); 30 | } 31 | 32 | TEST_CASE("test_begin") { 33 | REQUIRE(str(hello).begin() == hello); 34 | } 35 | 36 | TEST_CASE("test_end") { 37 | REQUIRE(str(hello).end() == &hello[hello_size]); 38 | } 39 | 40 | TEST_CASE("test_empty") { 41 | REQUIRE(str().empty()); 42 | REQUIRE(str("").empty()); 43 | REQUIRE(!str("\n").empty()); 44 | REQUIRE(!str(hello).empty()); 45 | } 46 | 47 | TEST_CASE("test_clear") { 48 | str s(""); 49 | REQUIRE(s.data() == ""); 50 | s.clear(); 51 | REQUIRE(s.data() == nullptr); 52 | } 53 | 54 | TEST_CASE("test_length") { 55 | REQUIRE(str().length() == 0); 56 | REQUIRE(str("").length() == 0); 57 | REQUIRE(str(hello).length() == hello_size); 58 | } 59 | 60 | TEST_CASE("test_size") { 61 | REQUIRE(str().size() == 0); 62 | REQUIRE(str("").size() == 0); 63 | REQUIRE(str(hello).size() == hello_size); 64 | } 65 | 66 | TEST_CASE("test_c_str") { 67 | REQUIRE(str().c_str() == nullptr); 68 | REQUIRE(str(hello).c_str() == hello); 69 | } 70 | 71 | TEST_CASE("test_data") { 72 | REQUIRE(str().data() == nullptr); 73 | REQUIRE(str(hello).data() == hello); 74 | } 75 | 76 | TEST_CASE("test_operator_brackets") { 77 | for (auto i = 0U; i < std::strlen(hello); i++) { 78 | REQUIRE(str(hello)[i] == hello[i]); 79 | } 80 | REQUIRE(str(hello)[hello_size] == '\0'); 81 | } 82 | 83 | TEST_CASE("test_at") { 84 | for (auto i = 0U; i < std::strlen(hello); i++) { 85 | REQUIRE(str(hello).at(i) == hello[i]); 86 | } 87 | REQUIRE_THROWS_AS(str(hello).at(hello_size), std::out_of_range); 88 | } 89 | 90 | TEST_CASE("test_back") { 91 | REQUIRE(str(hello).back() == '\n'); 92 | } 93 | 94 | TEST_CASE("test_front") { 95 | REQUIRE(str(hello).front() == 'H'); 96 | } 97 | 98 | TEST_CASE("test_pop_back") { 99 | char buffer[16] {"foobar"}; 100 | REQUIRE(buffer[5] == 'r'); 101 | str(buffer).pop_back(); 102 | REQUIRE(buffer[5] == '\0'); 103 | REQUIRE(std::strcmp(buffer, "fooba") == 0); 104 | } 105 | 106 | TEST_CASE("test_compare") { 107 | REQUIRE(str(hello).compare(str(hello)) == 0); 108 | } 109 | 110 | TEST_CASE("test_copy") { 111 | char buffer[16]; 112 | str(hello).copy(buffer, hello_size); 113 | REQUIRE(std::strcmp(buffer, hello) == 0); 114 | } 115 | 116 | TEST_CASE("test_find") { 117 | REQUIRE(str(hello).find('H') == 0); 118 | REQUIRE(str(hello).find('l') == 2); 119 | //REQUIRE(str(hello).find('?') == str::npos); // FIXME 120 | } 121 | 122 | TEST_CASE("test_find_with_pos") { 123 | //REQUIRE(str(hello).find('H', 1) == str::npos); // FIXME 124 | REQUIRE(str(hello).find('l', 3) == 3); 125 | REQUIRE(str(hello).find('l', 4) == 10); 126 | } 127 | 128 | TEST_CASE("test_rfind") { 129 | REQUIRE(str(hello).rfind('H') == 0); 130 | REQUIRE(str(hello).rfind('l') == 10); 131 | //REQUIRE(str(hello).rfind('?') == str::npos); // FIXME 132 | } 133 | 134 | TEST_CASE("test_rfind_with_pos") { 135 | //REQUIRE(str(hello).rfind('l', 11) == str::npos); // FIXME 136 | } 137 | 138 | TEST_CASE("test_substr") { 139 | for (auto i = 0U; i < std::strlen(hello); i++) { 140 | REQUIRE(str(hello).substr(i).data() == hello + i); 141 | } 142 | } 143 | 144 | TEST_CASE("test_substr_from") { 145 | REQUIRE(str("foo/bar").substr_from('/').data() == "foo/bar" + 3); 146 | } 147 | 148 | TEST_CASE("test_substr_after") { 149 | REQUIRE(str("foo/bar").substr_after('/').data() == "foo/bar" + 4); 150 | } 151 | 152 | TEST_CASE("test_has_prefix") { 153 | REQUIRE(str{"foo/bar"}.has_prefix("foo/") == true); 154 | REQUIRE(str{"foo/bar"}.has_prefix("/bar") == false); 155 | } 156 | 157 | TEST_CASE("test_has_suffix") { 158 | REQUIRE(str{"foo/bar"}.has_suffix("/bar") == true); 159 | REQUIRE(str{"foo/bar"}.has_suffix("foo/") == false); 160 | } 161 | -------------------------------------------------------------------------------- /test/check_uuid.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #include "catch.hpp" 4 | 5 | #include 6 | 7 | TEST_CASE("test_uuid") { 8 | // TODO 9 | } 10 | -------------------------------------------------------------------------------- /test/check_version.cc: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #include "catch.hpp" 4 | 5 | #include 6 | 7 | TEST_CASE("test_version") { 8 | // TODO 9 | } 10 | --------------------------------------------------------------------------------